summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/brakeman.rake9
-rw-r--r--lib/tasks/test.rake2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/tasks/brakeman.rake b/lib/tasks/brakeman.rake
new file mode 100644
index 00000000000..abcb5f0ae46
--- /dev/null
+++ b/lib/tasks/brakeman.rake
@@ -0,0 +1,9 @@
+desc 'Security check via brakeman'
+task :brakeman do
+ if system("brakeman --skip-files lib/backup/repository.rb -w3 -z")
+ exit 0
+ else
+ puts 'Security check failed'
+ exit 1
+ end
+end
diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake
index 3ea9290a814..a39d9649876 100644
--- a/lib/tasks/test.rake
+++ b/lib/tasks/test.rake
@@ -9,5 +9,5 @@ unless Rails.env.production?
require 'coveralls/rake/task'
Coveralls::RakeTask.new
desc "GITLAB | Run all tests on CI with simplecov"
- task :test_ci => [:rubocop, :spinach, :spec, 'coveralls:push']
+ task :test_ci => [:rubocop, :brakeman, 'jasmine:ci', :spinach, :spec, 'coveralls:push']
end