Skip to content
vetkitChecksChangelogDocumentation

vetkit.py.command-injection.shell

A shell command is built from a non-literal value (os.system / subprocess with shell=True). This allows OS command injection.

Last updated:

Suite: Security

python

A shell command is built from a non-literal value (os.system / subprocess with shell=True). This allows OS command injection.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Call subprocess.run with an argument list and shell=False; use shlex.quote only as a last resort.

References

Source: packages/engine/rules/sast/python.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.