-
Notifications
You must be signed in to change notification settings - Fork 45
.pr_agent_accepted_suggestions
PR 732 (2025-02-14) |
[possible issue] Add remote repository availability check
✅ Add remote repository availability check
Add proper error handling for the git fetch command by checking if the remote repository is accessible before attempting to fetch tags.
frontend/packages/cli/vite-plugins/set-env.ts [47-48]
try {
+ execSync('git ls-remote --quiet https://github.com/liam-hq/liam.git >/dev/null 2>&1')
execSync('git fetch --tags')
Suggestion importance[1-10]: 7
__
Why: Adding a pre-check for remote repository accessibility would prevent unclear error messages and improve error handling, making the code more robust in cases of network issues or repository access problems.
PR 710 (2025-02-12) |
[security] Validate version input format
✅ Validate version input format
Validate the version input format before using it in the Docker command to prevent potential injection attacks.
.github/workflows/released_package_test.yml [37]
+if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then
+ echo "Error: Invalid version format"
+ exit 1
+fi
docker run --rm node:22-bullseye npx --yes @liam-hq/cli@${version} --version
Suggestion importance[1-10]: 9
__
Why: Adding version format validation is critical for security as it prevents potential command injection attacks through malformed version strings in the Docker command execution.