bin/brakeman in brakeman-1.7.1 vs bin/brakeman in brakeman-1.8.0
- old
+ new
@@ -53,9 +53,12 @@
end
if options[:previous_results_json]
vulns = Brakeman.compare options.merge(:quiet => options[:quiet])
puts JSON.pretty_generate(vulns)
+ if options[:exit_on_warn] and (vulns[:new].count + vulns[:fixed].count > 0)
+ exit Brakeman::Warnings_Found_Exit_Code
+ end
else
#Run scan and output a report
tracker = Brakeman.run options.merge(:print_report => true, :quiet => options[:quiet])
#Return error code if --exit-on-warn is used and warnings were found