提交 a4fc0bbd 编写于 作者: F fsword 提交者: Justin Collins

Set exit code when difference is found (compare mode)

上级 df685c28
......@@ -55,6 +55,9 @@ 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])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册