Warnings_Found_Exit_Code | = | 3 | This exit code is used when warnings are found and the —exit-on-warn option is set | |
No_App_Found_Exit_Code | = | 4 | Exit code returned when no Rails application is detected | |
Not_Latest_Version_Exit_Code | = | 5 | Exit code returned when brakeman was outdated | |
Missing_Checks_Exit_Code | = | 6 | Exit code returned when user requests non-existent checks | |
Errors_Found_Exit_Code | = | 7 | Exit code returned when errors were found and the —exit-on-error option is set | |
CONFIG_FILES | = | [ File.expand_path("~/.brakeman/config.yml"), File.expand_path("/etc/brakeman/config.yml") | ||
ASTFile | = | Struct.new(:path, :ast) | ||
Version | = | "4.4.0" |
Rescan a subset of files in a Rails application.
A full scan must have been run already to use this method. The returned Tracker object from Brakeman.run is used as a starting point for the rescan.
Options may be given as a hash with the same values as Brakeman.run. Note that these options will be merged into the Tracker.
This method returns a RescanReport object with information about the scan. However, the Tracker object will also be modified as the scan is run.
Run Brakeman scan. Returns Tracker object.
* :app_path - path to root of Rails app (required) * :additional_checks_path - array of additional directories containing additional out-of-tree checks to run * :additional_libs_path - array of additional application relative lib directories (ex. app/mailers) to process * :assume_all_routes - assume all methods are routes (default: true) * :check_arguments - check arguments of methods (default: true) * :collapse_mass_assignment - report unprotected models in single warning (default: false) * :combine_locations - combine warning locations (default: true) * :config_file - configuration file * :escape_html - escape HTML by default (automatic) * :exit_on_error - only affects Commandline module (default: true) * :exit_on_warn - only affects Commandline module (default: true) * :github_repo - github repo to use for file links (user/repo[/path][@ref]) * :highlight_user_input - highlight user input in reported warnings (default: true) * :html_style - path to CSS file * :ignore_model_output - consider models safe (default: false) * :index_libs - add libraries to call index (default: true) * :interprocedural - limited interprocedural processing of method calls (default: false) * :message_limit - limit length of messages * :min_confidence - minimum confidence (0-2, 0 is highest) * :output_files - files for output * :output_formats - formats for output (:to_s, :to_tabs, :to_csv, :to_html) * :parallel_checks - run checks in parallel (default: true) * :parser_timeout - set timeout for parsing an individual file (default: 10 seconds) * :print_report - if no output file specified, print to stdout (default: false) * :quiet - suppress most messages (default: true) * :rails3 - force Rails 3 mode (automatic) * :report_routes - show found routes on controllers (default: false) * :run_checks - array of checks to run (run all if not specified) * :safe_methods - array of methods to consider safe * :skip_libs - do not process lib/ directory (default: false) * :skip_checks - checks not to run (run all if not specified) * :absolute_paths - show absolute path of each file (default: false) * :summary_only - only output summary section of report for plain/table (:summary_only, :no_summary, true)
Alternatively, just supply a path as a string.