Brakeman
$ brakeman Community Low RiskBrakeman 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.
https://github.com/presidentbeef/brakeman/releases brakeman -f json statically parses Rails codebases locally in seconds without booting the app or routing source via MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
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
Purely static Ruby AST inspection that never executes application code or database migrations.
- Zero code execution; read-only unless
-owrites a report
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
Purpose-built understanding of Rails routes, ActiveRecord, ERB templates, and mass-assignment patterns.
- Deep Rails framework semantics
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
Thorough documentation at brakemanscanner.org covering options, warning types, and CI usage.
- Official docs at brakemanscanner.org/docs/
Security, Auth & Guardrails
None required; operates purely offline on local Rails source directories.
Free for non-commercial use under Brakeman Public Use License; commercial use may require a license.
# 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
brakeman -f json -q --no-exit-on-warn --no-pager .
Runs all default checks quietly (-q) without paging and emits structured JSON to stdout.
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-pagerflags.
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.