Skip to content

Add bundler-audit to the local gate and CI (herb-embedded-fa6) - #53

Merged
jleo3 merged 1 commit into
mainfrom
herb-embedded-fa6
Aug 18, 2026
Merged

Add bundler-audit to the local gate and CI (herb-embedded-fa6)#53
jleo3 merged 1 commit into
mainfrom
herb-embedded-fa6

Conversation

@jleo3

@jleo3 jleo3 commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • guides.rubygems.org/security recommends running bundler-audit against ruby-advisory-db in CI: it catches "the exact versions currently pinned in Gemfile.lock have a known CVE" immediately, a different signal from Dependabot's weekly "a newer version exists" check.
  • Wires Bundler::Audit::Task (the gem's own Rake::TaskLib, matching how RSpec::Core::RakeTask/RuboCop::RakeTask are already used in this Rakefile) into the default rake task.
  • Local runs use bundle:audit (check-only — auto-clones the advisory db if missing, but doesn't force-refresh an existing clone, to avoid requiring network access on every bundle exec rake).
  • CI explicitly runs bundle:audit:update before bundle:audit:check, so it never checks against a stale snapshot regardless of what a prior run left behind.

Note: CI doesn't currently invoke the full rake default task (it calls bundle:build and rspec as separate explicit steps, meaning rubocop has never run in CI either) — this PR deliberately doesn't change that, adding bundler-audit as its own explicit step instead. Flagging the pre-existing "CI never runs rubocop" gap for awareness; it's out of this bead's scope.

Acceptance criteria

  • bundler-audit runs as part of bundle exec rake and as part of CI.
  • A CI run against the current Gemfile.lock passes cleanly — verified locally: "No vulnerabilities found", both via a fresh database pull (1233 advisories) and the cached check.
  • The advisory database is kept current in CI, documented how — bundle:audit:update runs before bundle:audit:check in the CI step; the Rakefile comments explain the local/CI asymmetry.
  • bundle exec rake passes locally: 206 examples, 0 failures, 0 RuboCop offenses, no vulnerabilities found.

Test plan

  • bundle exec rake bundle:audit:check standalone: clean.
  • bundle exec rake bundle:audit:update bundle:audit:check (matching the exact CI invocation): database refreshed, then clean.
  • Full bundle exec rake: all green.

🤖 Generated with Claude Code

guides.rubygems.org/security recommends running bundler-audit against
ruby-advisory-db in CI: it catches "the exact versions currently pinned in
Gemfile.lock have a known CVE" the moment they land, a different signal
from Dependabot's weekly "a newer version exists" check.

Wires Bundler::Audit::Task (the gem's own Rake::TaskLib, matching how
RSpec::Core::RakeTask/RuboCop::RakeTask are already used) into the default
rake task. Local runs use bundle:audit (check only, auto-clones the
advisory db if missing but doesn't force-refresh an existing clone, to
avoid requiring network access on every bundle exec rake). CI explicitly
runs bundle:audit:update before bundle:audit:check, so it never checks
against a stale snapshot regardless of what a prior run left behind.

Verified against the current Gemfile.lock: no vulnerabilities found, both
via a fresh database pull (1233 advisories) and the cached local check.
@jleo3
jleo3 merged commit 8f74855 into main Aug 18, 2026
1 check passed
@jleo3
jleo3 deleted the herb-embedded-fa6 branch August 18, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant