Skip to content

Conversation

@ffflorian
Copy link
Owner

Potential fix for https://github.com/ffflorian/node-packages/security/code-scanning/4

To fix the problem, we should avoid constructing the shell command as a single string and instead use a safer API that accepts arguments as an array. The execFileSync method from the child_process module is a suitable alternative as it does not invoke a shell and thus avoids shell interpretation of the arguments.

  1. Replace the use of execSync with execFileSync.
  2. Construct the command and arguments separately, passing the arguments as an array to execFileSync.

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

…structed from library input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ffflorian ffflorian marked this pull request as ready for review November 10, 2025 19:40
@ffflorian ffflorian merged commit 9d74024 into main Nov 10, 2025
4 checks passed
@ffflorian ffflorian deleted the alert-autofix-4 branch November 10, 2025 19:40
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