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

os.system / os.popen built from a variable (Python)

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

os.system or os.popen runs a command string built with an f-string, .format(), %-formatting, or + concatenation, which is a command injection risk.

Why it matters

os.system and os.popen run their argument through /bin/sh, so a command built with an f-string, .format(), %, or + lets a crafted value inject extra shell commands. This is high impact with user-controlled input. It is a heuristic because it flags the building pattern, not proven untrusted data.

How to fix it

Use subprocess.run with an argument list and shell=False (the default): subprocess.run(["ping", "-c", "1", host]). This keeps arguments separate from the command and never invokes a shell. Validate any dynamic argument against an allowlist where relevant.

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