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.
More on Testing, services & metrics
Why should automation scripts have tests at all?BeginnerHow does pytest discover and run tests?BeginnerWhy does pytest use plain `assert` instead of `assertEqual`?BeginnerWhat are pytest fixtures, and what scopes exist?IntermediateWhat built-in fixtures do you use most?IntermediateHow does `@pytest.mark.parametrize` work?Beginner