Add bundle-audit Rake tasks

Thanks @cwest !

Source: http://caseywest.com/run-bundle-audit-from-rake/
This commit is contained in:
Brendan Coles
2015-08-18 04:35:32 +00:00
parent fbdbfd4896
commit bbeeabdffe
2 changed files with 35 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ if ENV['BEEF_TEST']
gem 'selenium'
gem 'selenium-webdriver'
gem 'rspec'
gem 'bundler-audit'
# nokogirl is needed by capybara which may require one of the below commands
# sudo apt-get install libxslt-dev libxml2-dev
# sudo port install libxml2 libxslt

View File

@@ -45,10 +45,44 @@ task :msf => ["install", "msf_install"] do
Rake::Task['msf_stop'].invoke
end
################################
# run bundle-audit
namespace :bundle_audit do
require 'bundler/audit/cli'
desc 'Update bundle-audit database'
task :update do
Bundler::Audit::CLI.new.update
end
desc 'Check gems for vulns using bundle-audit'
task :check do
Bundler::Audit::CLI.new.check
end
desc 'Update vulns database and check gems using bundle-audit'
task :run do
Rake::Task['bundle_audit:update'].invoke
Rake::Task['bundle_audit:check'].invoke
end
end
desc "Run bundle-audit"
task :bundle_audit do
Rake::Task['bundle_audit:run'].invoke
end
################################
# Install
#task :install do
# sh "export BEEF_TEST=true"
#end
################################
# X11 set up