Skip to content

Conversation

@ArcticFoxPro
Copy link
Owner

Potential fix for https://github.com/ArcticFoxPro/QQVersionListTool-WeChatMiniProgram/security/code-scanning/7

To fix the problem, we should avoid constructing the shell command as a single string and instead use execFileSync with an array of arguments. This approach ensures that each argument is passed to the command without being interpreted by the shell, thus preventing command injection vulnerabilities.

We will modify the runCommand function to use execFileSync and update the buildLicenses function to pass the command and arguments separately.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

… environment values

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ArcticFoxPro ArcticFoxPro marked this pull request as ready for review February 2, 2025 19:46
@ArcticFoxPro ArcticFoxPro merged commit 6222fb6 into main Feb 2, 2025
2 checks passed
@ArcticFoxPro ArcticFoxPro deleted the alert-autofix-7 branch February 3, 2025 06: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.

2 participants