From 537cb7680ef1695307048968f9d71dbf2a589a71 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 5 Apr 2025 17:20:51 +0200 Subject: [PATCH] Add Bundler Audit for Local CI --- Gemfile | 1 + Gemfile.lock | 4 ++++ bin/bundler-audit | 7 +++++++ 3 files changed, 12 insertions(+) create mode 100755 bin/bundler-audit diff --git a/Gemfile b/Gemfile index 213822917..edb02dcf8 100644 --- a/Gemfile +++ b/Gemfile @@ -35,6 +35,7 @@ gem "rails_structured_logging", bc: "rails-structured-logging" group :development, :test do gem "debug" + gem "bundler-audit", require: false gem "brakeman", require: false gem "rubocop-rails-omakase", require: false end diff --git a/Gemfile.lock b/Gemfile.lock index 9e079fe3f..449ed4982 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,6 +131,9 @@ GEM brakeman (7.0.0) racc builder (3.3.0) + bundler-audit (0.9.2) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) capybara (3.40.0) addressable matrix @@ -418,6 +421,7 @@ DEPENDENCIES bcrypt (~> 3.1.7) bootsnap brakeman + bundler-audit capybara debug geared_pagination (~> 1.2) diff --git a/bin/bundler-audit b/bin/bundler-audit new file mode 100755 index 000000000..3cd830e53 --- /dev/null +++ b/bin/bundler-audit @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "bundler/audit/cli" + +ARGV.concat %w[ --config config/bundler-audit.yml ] if ARGV.empty? || ARGV.include?("check") +Bundler::Audit::CLI.start +