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

Brakeman

$ brakeman Community Low Risk
Justin Collins · Security & Secrets · Brakeman Public Use License (MIT pre-2018) · macos / linux / windows

Brakeman is the standard static analysis security scanner for Ruby on Rails applications, parsing Ruby ASTs without loading or running the Rails app. It natively supports -f json and -f sarif, --only-files targeted scans, -q quiet mode, and --no-exit-on-warn for predictable automation.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
https://github.com/presidentbeef/brakeman/releases
CLI vs MCP Decision CLI Only

brakeman -f json statically parses Rails codebases locally in seconds without booting the app or routing source via MCP.

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 22 / 25

Supports -f json|sarif, --only-files, -q, --no-pager, --no-color, and --no-exit-on-warn for clean headless automation.

  • Native -f json, -f sarif, --only-files, and --no-exit-on-warn
Trust & Safety 23 / 25

Purely static Ruby AST inspection that never executes application code or database migrations.

  • Zero code execution; read-only unless -o writes a report
Setup & Portability 12 / 15

Cross-platform via RubyGems (gem install brakeman) or Docker, though it requires a Ruby runtime and has no Homebrew core formula.

  • RubyGem distribution requiring Ruby runtime
Utility & Efficiency 13 / 15

Purpose-built understanding of Rails routes, ActiveRecord, ERB templates, and mass-assignment patterns.

  • Deep Rails framework semantics
Maintenance & Lineage 7 / 10

Long-standing Rails security standard, though post-2018 commits moved to the source-available Brakeman Public Use License.

  • Maintained at presidentbeef/brakeman under Brakeman Public Use License
Docs & Verifiability 8 / 10

Thorough documentation at brakemanscanner.org covering options, warning types, and CI usage.

  • Official docs at brakemanscanner.org/docs/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates purely offline on local Rails source directories.

Side Effects
Read-Only Local Write
Cost & Quotas

Free for non-commercial use under Brakeman Public Use License; commercial use may require a license.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Brakeman Agent Rules
- Always pass `-q --no-pager -f json` (and `--no-exit-on-warn` when parsing JSON rather than failing immediately on `-z`).
- Verify commercial usage terms under the Brakeman Public Use License for proprietary pipelines.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan a Rails repo and print JSON findings
brakeman -f json -q --no-exit-on-warn --no-pager .

Runs all default checks quietly (-q) without paging and emits structured JSON to stdout.

Scan specific changed files and output SARIF
brakeman -A -f sarif --only-files app/controllers/users_controller.rb -o brakeman.sarif .

Runs all checks (-A) scoped to --only-files and saves a SARIF report to brakeman.sarif.

Strengths for Agents

  • + Understands Rails-specific attack surfaces statically without booting the application.
  • + Mature -f json / -f sarif, --only-files, and -q --no-pager flags.

Caveats & Pitfalls

  • ! Post-2018 releases use the Brakeman Public Use License with commercial-use restrictions.
  • ! Requires Ruby (gem install brakeman) rather than a standalone static binary.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI