Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

--compare would break with the -z flag

  • Loading branch information...
commit 37f0f15aeef33183354f0568b9c61ac40d695b78 1 parent c8fcd18
@oreoshake authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 bin/brakeman
View
14 bin/brakeman
@@ -52,16 +52,18 @@ trap("INT") do
exit!
end
-tracker = if options[:previous_results_json]
+if options[:previous_results_json]
vulns = Brakeman.compare options
puts JSON.pretty_generate(vulns)
else
#Run scan and output a report
- Brakeman.run options.merge(:print_report => true, :quiet => options[:quiet])
+ tracker = Brakeman.run options.merge(:print_report => true, :quiet => options[:quiet])
+
+ #Return error code if --exit-on-warn is used and warnings were found
+ if options[:exit_on_warn] and not tracker.checks.all_warnings.empty?
+ exit Brakeman::Warnings_Found_Exit_Code
+ end
end
-#Return error code if --exit-on-warn is used and warnings were found
-if options[:exit_on_warn] and not tracker.checks.all_warnings.empty?
- exit Brakeman::Warnings_Found_Exit_Code
-end
+
Please sign in to comment.
Something went wrong with that request. Please try again.