Class Brakeman::Checks
In: lib/brakeman/checks.rb
Parent: Object

Collects up results from running different checks.

Checks can be added with +Check.add(check_class)+

All .rb files in checks/ will be loaded.

Methods

Attributes

checks_run  [R] 
controller_warnings  [R] 
model_warnings  [R] 
template_warnings  [R] 
warnings  [R] 

Public Class methods

Add a check. This will call +klass.new+ when running tests

Add an optional check

No need to use this directly.

Run all the checks on the given Tracker. Returns a new instance of Checks with the results.

Public Instance methods

Add Warning to list of warnings to report. Warnings are split into four different arrays for template, controller, model, and generic warnings.

Will not add warnings which are below the minimum confidence level.

Return an array of all warnings found.

Return a hash of arrays of new and fixed warnings

    diff = checks.diff old_checks
    diff[:fixed]  # [...]
    diff[:new]    # [...]

[Validate]