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

Runtime.exec / ProcessBuilder built from a variable (Java)

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

Runtime.getRuntime().exec or new ProcessBuilder concatenates a value into the command with +, which is a command injection risk when the value is user-controlled.

Why it matters

Concatenating a value into Runtime.getRuntime().exec or new ProcessBuilder builds a command from text. Depending on how it is split, a crafted value can add arguments or, on the single-string exec form, inject commands. This is a heuristic because concatenating a constant is safe but matches the same shape.

How to fix it

Use the ProcessBuilder(List<String>) or exec(String[]) form and pass each argument as a separate array element, so arguments stay separate from the program. Do not build a single command string. Validate dynamic arguments against an allowlist where appropriate.

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