Potential fix for pull request finding 'CodeQL / Shell command built from environment values'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Chris ScottandCopilot Autofix powered by AI authored and GitHub committed 2026-07-28 11:12:36 -04:00
1 parent 4cdd3d7d0b
commit 3ad90e5894
1 file changed
+1 -1
+1 -1
View File
@@ -49,7 +49,7 @@ afterEach(() => {
})
const runScript = (snippet: string, env: Record<string, string> = {}) =>
spawnSync('bash', ['-c', `set -e\nsource "${libPath}"\n${snippet}`], {
spawnSync('bash', ['-c', 'set -e\nsource "$1"\n$2', '--', libPath, snippet], {
encoding: 'utf-8',
env: {
...process.env,