Interview Prep/Python for DevOps/Testing, services & metrics

What does Bandit catch?

IntermediateConceptTesting, services & metrics
Answer

Bandit is a security-focused static analyser for Python. Typical findings: subprocess with shell=True (B602), yaml.load (B506), requests with verify=False (B501), hardcoded passwords (B105), pickle loads (B301), assert used for security checks (B101, since asserts are stripped with -O), weak hashes like MD5 for security (B324), binding to 0.0.0.0 (B104). Ruff implements many Bandit rules under the S prefix.

All Python for DevOps questions Roadmap: Python for automation

More on Testing, services & metrics