Skip to content

Comments

fix:template and add requirement.txt#102

Merged
yaozheng-fang merged 2 commits intomainfrom
fix/template
Aug 26, 2025
Merged

fix:template and add requirement.txt#102
yaozheng-fang merged 2 commits intomainfrom
fix/template

Conversation

@cuericlee
Copy link
Collaborator

No description provided.

@cuericlee cuericlee requested review from Copilot and yaozheng-fang and removed request for yaozheng-fang August 26, 2025 04:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a template script and adds security configuration. The main purpose is to improve the deployment script's dependency management and add proper environment variable validation while configuring security scanning rules.

  • Enhanced dependency installation with conditional checks for FastAPI and Uvicorn
  • Added validation for the MODEL_AGENT_API_KEY environment variable
  • Updated GitLeaks configuration to allow requirements.txt files

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/run.sh Enhanced script with conditional dependency installation and environment variable validation
.gitleaks.toml Added allowlist for requirements.txt files in security scanning

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


# in case of deployment deps not installed in user's requirements.txt
python3 -m pip install uvicorn[standard] fastapi
if pip list | grep "^fastapi \|^uvicorn "; then
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grep pattern will only succeed if both fastapi AND uvicorn are installed due to the pipe operator. This should use separate checks or modify the pattern to check for either package independently.

Suggested change
if pip list | grep "^fastapi \|^uvicorn "; then
if pip list | grep "^fastapi " >/dev/null && pip list | grep "^uvicorn " >/dev/null; then

Copilot uses AI. Check for mistakes.
…ame}}/src/run.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yaozheng-fang yaozheng-fang merged commit e95ff42 into main Aug 26, 2025
10 checks passed
@yaozheng-fang yaozheng-fang deleted the fix/template branch August 29, 2025 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants