# Brakeman

Review Rails security warnings

Analyze Rails controllers, models and views for unsafe data flow. Triage warnings by confidence and link each accepted exception to a review decision.

Category: Security
Languages: Ruby

## Standard evidence

Rubric v1 · 6/8 verified · 2 unknown · 0 contrary · reviewed 2026-11-28

- **Definition** (verified) — The Rails warning guide identifies interpolation of request data into a SQL condition as a specific unsafe data flow. Reviewed 2026-11-28. [Source](https://brakemanscanner.org/docs/warning_types/sql_injection/)
- **Measurement** (verified) — The worked example shows a source expression, its SQL injection warning and the associated confidence. This checks a particular class of security finding. Reviewed 2026-11-28. [Source](https://brakemanscanner.org/docs/warning_types/sql_injection/)
- **Conformance** (unknown) — No reviewed evidence is recorded for this dimension.
- **CI enforcement** (verified) — Brakeman returns a failure status for security warnings and scanner errors by default. A CI job running the scanner can therefore reject warnings. Reviewed 2026-11-28. [Source](https://brakemanscanner.org/docs/options/)
- **Getting started** (verified) — The quick start installs Brakeman, runs it on a Rails application and walks through a report. The report groups findings and identifies the confidence level to inspect first. Reviewed 2026-11-28. [Source](https://brakemanscanner.org/docs/quickstart/)
- **Real-world adoption** (verified) — The Rails getting-started guide includes Brakeman in generated applications and documents running bin/brakeman as part of the application's security checks. Reviewed 2026-11-28. [Source](https://guides.rubyonrails.org/getting_started.html)
- **Agent guidance** (verified) — For the illustrated Active Record query, locate the interpolated request value in the finding, replace interpolation with bound parameters, and recheck the same query for that warning. Reviewed 2026-11-28. [Source](https://brakemanscanner.org/docs/warning_types/sql_injection/)
- **Agent portability** (unknown) — No reviewed evidence is recorded for this dimension.

## Adoption

Use Brakeman in this repository to meet this standard: Review Rails security warnings. Analyze Rails controllers, models and views for unsafe data flow. Triage warnings by confidence and link each accepted exception to a review decision. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.

### Tool command

```
bundle exec brakeman
```

Seikika package: no verified installation is listed.

## References

- [Tool documentation](https://brakemanscanner.org/)
- [Agent skill](/skills/brakeman/SKILL.md)
