← all rules
code/py-os-system
Command Injection: os.system with string interpolation
What it detects
os.system passes its argument to /bin/sh -c. Any interpolated variable becomes a potential injection.
How it runs
Applied line-by-line via a tagged regex with language-specific gating. Comments are skipped. Designed for high-confidence patterns where AST parsing would be overkill.
Found a false positive or want this rule tuned? File an issue. You can also suppress per-repo via a .repoguardignore line.