2015-03-02 20:41:05 -05:00
|
|
|
desc 'Security check via brakeman'
|
|
|
|
task :brakeman do
|
2015-05-11 12:11:09 -04:00
|
|
|
# We get 0 warnings at level 'w3' but we would like to reach 'w2'. Merge
|
|
|
|
# requests are welcome!
|
2017-04-20 08:51:38 -04:00
|
|
|
if system(*%w(brakeman --no-progress --skip-files lib/backup/repository.rb,app/controllers/unicorn_test_controller.rb -w3 -z))
|
2015-03-19 11:37:21 -04:00
|
|
|
puts 'Security check succeed'
|
2015-03-02 20:41:05 -05:00
|
|
|
else
|
|
|
|
puts 'Security check failed'
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
end
|