Skip to content

Commit 94a287f

Browse files
Add bundler-audit Gem, temporarily disable brakeman warnings in local CI
1 parent aa5fb58 commit 94a287f

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ end
7272

7373
group :development, :test do
7474
gem 'brakeman', require: false
75+
gem 'bundler-audit', require: false
7576
gem 'dotenv-rails', '~> 3.1'
7677
gem 'parallel_tests', '~> 5.4'
7778
gem 'rspec-rails', '~> 7.0'

Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ GEM
100100
brakeman (7.1.1)
101101
racc
102102
builder (3.3.0)
103+
bundler-audit (0.9.2)
104+
bundler (>= 1.2.0, < 3)
105+
thor (~> 1.0)
103106
capybara (3.40.0)
104107
addressable
105108
matrix
@@ -622,6 +625,7 @@ DEPENDENCIES
622625
barnes (~> 0.0)
623626
bootsnap (~> 1.18)
624627
brakeman
628+
bundler-audit
625629
capybara (~> 3.40)
626630
capybara-email (~> 3.0)
627631
class_variants (~> 1.1)

bin/bundler-audit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env ruby
2+
require_relative '../config/boot'
3+
require 'bundler/audit/cli'
4+
5+
ARGV.concat %w[--config config/bundler-audit.yml] if ARGV.empty? || ARGV.include?('check')
6+
Bundler::Audit::CLI.start

config/ci.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
step 'Style: JS', 'yarn lint'
99
step 'Style: CSS', 'yarn run stylelint'
1010

11-
step 'Security: Brakeman code analysis', 'bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error'
11+
step 'Security: Gem audit', 'bin/bundler-audit'
12+
# TODO: Swap to --exit-on-warn --exit-on-error once issues are resolved
13+
step 'Security: Brakeman code analysis', 'bin/brakeman --quiet --no-pager --no-exit-on-warn --no-exit-on-error'
1214

1315
step 'Tests: Rails', 'bin/rspec --tag ~type:system'
1416
step 'Tests: System', 'bin/rails spec:system'

0 commit comments

Comments
 (0)