Skip to content

Commit

Permalink
Merge pull request #23128 from Fryguy/security_suite_run_all
Browse files Browse the repository at this point in the history
Run all security tests before failing any one of them
  • Loading branch information
jrafanie authored Aug 5, 2024
2 parents 6c3b7dd + 9e55df0 commit b533c2c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/tasks/test_security_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,15 @@ def self.yarn_audit(format: "human")
end

def self.all(format: "human")
brakeman(format: format)
puts
bundle_audit(format: format)
puts
yarn_audit(format: format)
true
success = %i[bundle_audit brakeman yarn_audit].map do |suite|
public_send(suite, format: format)
true
rescue SecurityTestFailed
false
ensure
puts
end.all?

raise SecurityTestFailed unless success
end
end

0 comments on commit b533c2c

Please sign in to comment.