ai-agents-metrics

ARCH-010: Integrate bandit security scanner into verify

Problem

Security scanning is not enforced in CI/CD. Bandit (Python security linter) has been added as a dev dependency but is not yet integrated into make verify because there are 13 outstanding security issues to fix:

Current state: make bandit runs separately but is excluded from make verify.

Solution

  1. Fix all B110 issues (explicit exception handling)
  2. Suppress B608 issues with # nosec B608 comments (safe patterns already in use)
  3. Add bandit target to make verify
  4. Verify in CI/CD that make verify passes

Global skips rationale

make bandit runs with --skip B404,B603,B607. These are permanently skipped globally:

B105 (hardcoded_password_string) is not globally skipped — it must be suppressed inline with # nosec B105 where it fires. This keeps the rule active for real cases (e.g. an actual password literal added in future) while documenting each suppression explicitly.

Acceptance Criteria

Status

done

Dependencies

None — can be picked up independently.