Aalexbit-codemod

pythonsecurity-s2076-command-injection-mining

Mine pythonsecurity:S2076: OS commands should not be vulnerable to command injection attacks; read-only metrics with blocking severity

miningmetricspythonsecuritypythonsecurity:S2076
Public
0 executions

Run locally

npx codemod pythonsecurity-s2076-command-injection-mining

pythonsecurity-s2076-command-injection-mining

Read-only mining codemod for pythonsecurity:S2076: OS commands should not be vulnerable to command injection attacks.

Emits python_security_finding metric rows with blocking severity. Source files are never modified.

Rule

  • ID: pythonsecurity:S2076
  • Severity: blocking
  • Remediation: Avoid shell=True and pass arguments as a list without shell interpolation

Usage

bash

Development

bash

Ready to contribute?

Build your own codemod and share it with the community.