Shell command built from variable input
Part of Security, which counts for 30% of the overall score. When this check fires it deducts 25 points from that category, once per scan, no matter how many places it turns up.
What it detects
os.system/subprocess with shell=True, or child_process.exec, risk command injection when fed unsanitized input.
Why it matters
os.system, shell=True, and child_process.exec hand a single string to a shell, so metacharacters in any variable part (a filename, a form field) can chain extra commands. That turns a file upload or search box into a way to run arbitrary commands on your server. Passing arguments as a list avoids the shell entirely.
How to fix it
In Python use subprocess.run([...]) with an argument list and shell=False (the default), never os.system with variables. In Node use child_process.execFile or spawn with an args array instead of exec. If you need shell features like pipes, restructure into multiple subprocess calls, or as a last resort quote each argument with shlex.quote.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo