Will It Vibe logoWill It Vibe?
INJECT-009Medium severity-8 points

Shell command built from a variable (JS/TS)

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

child_process exec/execSync runs a command string assembled by interpolation or concatenation, which runs through a shell and is a command injection risk.

Why it matters

child_process exec and execSync run their argument through a shell, so a command assembled by interpolation or concatenation lets a crafted value inject extra commands with a semicolon or backticks. This is high impact when the input is user-controlled. It is a heuristic because it cannot confirm the source of the value.

How to fix it

Switch to execFile or spawn with the command and an argument array, which does not invoke a shell and keeps arguments separate from the command. If you truly need a shell, validate the dynamic input against a strict allowlist first. Never concatenate user input into an exec string.

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

Related Security checks