Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Bandit

$ bandit Foundation Low Risk
PyCQA · Security & Secrets · Apache-2.0 · macos / linux / windows

bandit walks Python ASTs to flag common security flaws (eval, pickle, shell=True, weak hashes, hardcoded passwords). It runs offline and read-only, with -f json -q and -ll severity flags keeping agent security checks fast and structured.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
brew install bandit
CLI vs MCP Decision CLI Preferred vs MCP

Python AST security checks finish in milliseconds locally via bandit -f json without any MCP server.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports -f json, -q, -ll/-ii severity/confidence filters, and --exit-zero.

  • Native -f json and -q non-interactive flags
Trust & Safety 25 / 25

Purely read-only offline Python AST analyzer; never executes target code or makes network calls.

  • Zero code execution, zero writes, zero network activity
Setup & Portability 13 / 15

Easy across brew, pip, and uvx, requiring only a Python runtime.

  • Standard PyPI/Homebrew availability
Utility & Efficiency 11 / 15

Fast, focused Python security check, though single-language and narrower than semgrep or ruff S-rules.

  • Python-only AST security rules
Maintenance & Lineage 9 / 10

Official PyCQA (Python Code Quality Authority) foundation project under Apache-2.0.

  • PyCQA stewardship
Docs & Verifiability 8 / 10

Clear ReadTheDocs manual covering every Bxxx test ID and pyproject.toml config.

  • Official docs at bandit.readthedocs.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; analyzes local Python source ASTs offline.

Side Effects
Read-Only
Cost & Quotas

100% free, offline, and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Bandit Agent Rules
- Always pass `-f json -q` (and `-ll` to filter out noisy low-severity info findings).
- Use `-x tests/` or `pyproject.toml` `[tool.bandit]` exclusions so `assert` warnings in `pytest` files do not pollute results.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan Python package for medium/high severity issues as JSON
bandit -r src/ -f json -ll -q

Reports medium/high severity findings (-ll) in JSON with progress bars suppressed (-q).

Strengths for Agents

  • + 100% offline, strictly read-only Python AST security scanner with -f json -q.
  • + Granular -ll/-ii severity and confidence thresholds trim false positives.

Caveats & Pitfalls

  • ! Python-only; scanning test directories without -x tests/ triggers noisy B101 (assert) warnings.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI