explaingit

presidentbeef/brakeman

7,231RubyAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A static security scanner for Ruby on Rails apps that checks your code for common vulnerabilities without running the app, producing reports in plain text, HTML, JSON, CSV, and Markdown.

Mindmap

mindmap
  root((Brakeman))
    What it does
      Rails security scanner
      Static code analysis
      No app execution needed
    Warning Levels
      High confidence
      Medium confidence
      Weak confidence
    Output Formats
      HTML report
      JSON for CI
      CSV and Markdown
    Integrations
      GitHub Actions
      Jenkins plugin
      Guard file watcher
    Tech Stack
      Ruby 3.2 plus
      Rails 2.3 to 8.x
    Setup
      gem install brakeman
      Non-commercial only
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Scan a Ruby on Rails project for security vulnerabilities like SQL injection or XSS before deploying.

USE CASE 2

Compare two scan reports to see which warnings are new and which have been fixed since last time.

USE CASE 3

Add Brakeman to a CI pipeline with a GitHub Action to automatically flag new security issues on every pull request.

USE CASE 4

Generate an HTML security report to share with a non-technical reviewer assessing a Rails app's safety.

Tech stack

RubyRuby on RailsDockerYAML

Getting it running

Difficulty · easy Time to first run · 5min

Non-commercial use only, commercial projects require a separate license from the author.

Free to use for non-commercial purposes only, contact the author for commercial licensing.

In plain English

Brakeman is a security scanning tool for Ruby on Rails applications. Ruby on Rails is a popular web framework used to build web apps quickly, and Brakeman checks the code in a Rails project for common security problems without running the app. This kind of checking is called static analysis because it reads the code rather than executing it. Running Brakeman is straightforward: install it once, then point it at a Rails project folder and it scans the code and produces a report. Reports can be saved in many formats including plain text, HTML, JSON, CSV, and Markdown, making it easy to fit into different workflows. Multiple output files can be generated in one run, and the tool can be run inside Docker if no local installation is preferred. Each warning Brakeman produces comes with a confidence level: High means the problem is very likely real, Medium means a variable is used in a potentially unsafe way but it is unclear whether user input can reach it, and Weak means user input is involved only indirectly. Developers can filter warnings by confidence level to focus on the most certain problems first. Specific checks can also be skipped or selectively run, which is useful when a particular warning type does not apply to a project. Brakeman can compare a current scan against a previous JSON report to show which warnings are new and which have been fixed. It reads configuration from YAML files so teams can store their preferred settings in version control. Integration with continuous integration systems is supported through a Jenkins plugin, a Guard plugin for automated re-scanning on file changes, and several GitHub Actions available in the marketplace. Notable organizations that use Brakeman include GitHub, Twitter, New Relic, Groupon, and Code Climate. The tool is free for non-commercial use. It supports Rails versions from 2.3 through 8.x and requires at least Ruby 3.2 to run.

Copy-paste prompts

Prompt 1
Run Brakeman on my Rails app and generate an HTML report showing only high-confidence security warnings.
Prompt 2
How do I configure Brakeman in a YAML file to skip specific checks that do not apply to my Rails project?
Prompt 3
Set up a GitHub Action that runs Brakeman on every pull request and fails the check if new high-confidence warnings appear.
Prompt 4
How do I compare two Brakeman JSON reports to see which security warnings are new since the previous scan?
Prompt 5
Show me how to run Brakeman inside Docker without installing Ruby or any gems locally on my machine.
Open on GitHub → Explain another repo

← presidentbeef on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.