vetkit.js.command-injection.child-process
child_process.exec/execSync runs its argument through a shell. Building the command from dynamic values allows shell command injection.
Last updated:
Suite: Security
javascript, typescript
child_process.exec/execSync runs its argument through a shell. Building the command from dynamic values allows shell command injection.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Use execFile/spawn with an argument array and without shell: true; validate inputs against an allow-list.
References
Source: packages/engine/rules/sast/javascript.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.