This release has breaking changes!
This is the 101st official release of Brakeman! It has been seven years and one month since the first release of Brakeman.
To put that into historical context, Rails 3.0 was released a few days later!
How about some more numbers?
Thank you so much to everyone who has used, contributed to, or promoted Brakeman over the past seven years!
As a token of our appreciation, we have a limited edition 2017 Brakeman sticker:
Just email [email protected] with your name and address (anywhere in the world) and we’ll send you one. While supplies last!
If you have benefited from Brakeman, please consider supporting continued development via Brakeman Pro.
Changes since 3.7.2:
--exit-on-warn is now the default (#852)
--exit-on-error is now the default (#1083)
- “Plain” report output is now the default
- Add simple pager for reports output to terminal
- Remove low confidence mass assignment warnings
- Reduce warnings about XSS in
raise like early returns (#754)
- Rename “Cross Site Scripting” to “Cross-Site Scripting” (Paul Tetreau)
- Remove reliance on
CONFIDENCE constant in checks
--exit-on-warn in config files
Changes since 4.0.0:
- Do not use pager when
CI environment variable is set
New Default Exit Codes
--exit-on-error are now default behavior.
If any warnings are found or errors are raised during the scan, Brakeman’s exit code will be non-zero. This may break things! In particular, CI jobs or scripts that assume Brakeman will exit normally.
You may use
--no-exit-on-error to revert back to previous behavior and always exit with error code 0.
(changes and changes)
New Default Report Format
The “plain” report format is now the default.
To revert back to the table format, use
-f tables or
By default, output to the terminal will be paged with
less or Highline’s simple pager.
To disable, use
In 4.0.1 Brakeman will automatically disable the pager when the
CI environment variable is set to
true. This should be compatible with Travis CI, Circle CI, Codeship, and Bitbucket Pipelines.
Fewer Mass Assignment Warnings
Low confidence mass assignment warnings have been removed in this release. Brakeman should now only warn when user input is used directly in the instantiation or update of a model.
Warnings about XSS in
link_to have confused quite a few people over the years. The danger is that links may have
data: values with XSS payloads.
Brakeman should now only warn when directly using user input or when using what looks like a URL from the database.
request.cookies will now be treated like cookies in general.
More Early Returns
fail will be treated like early returns when considering simple guard expressions.
Messages about “Cross Site Scripting” will now include a hyphen. This does not affect warning fingerprints.
Brakeman checks previously used the
CONFIDENCE hash when creating warnings, e.g.
:confidence => CONFIDENCE[:high]. Now it’s possible to use
:confidence => :high instead.
For those with custom checks, the
CONFIDENCE hash is still available and nothing should break.
The SHA256 sums for these releases are:
Thank you to everyone who reported bugs and contributed to this release.
Please report any issues with this release! Take a look at this guide to reporting Brakeman problems.
Follow @brakeman on Twitter and hang out on Gitter for questions and discussion.
If you find Brakeman valuable and want to support its development, check out Brakeman Pro.