Skip to content

Commit d5f5125

Browse files
Potential fix for code scanning alert no. 11: Shell command built from environment values
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent ee33d67 commit d5f5125

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/build-artifacts.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ describe('Build Artifacts', () => {
9090
const query = 'foo.bar';
9191

9292
// Test basic functionality
93-
const result = execSync(`echo '${testData}' | node ${binPath} '${query}'`, {
93+
const { spawnSync } = require('child_process');
94+
const echoProcess = spawnSync('echo', [testData], { encoding: 'utf-8' });
95+
const result = execFileSync('node', [binPath, query], {
96+
input: echoProcess.stdout,
9497
encoding: 'utf-8',
9598
cwd: process.cwd(),
9699
});

0 commit comments

Comments
 (0)