bundle_audit_agent

A security-scanning agent that checks a Rails application’s Gemfile.lock for known vulnerabilities in its Ruby dependencies using bundler-audit.

In plain words
What is it for?
Use it to scan the locked dependencies of a Rails project and return the bundler-audit findings.
Why use it?
It helps identify vulnerable packages and handles installing the audit tool when the project does not already contain it.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/rubyroidlabs/rails-audit-skill/bundle_audit_agent
Clone the repo
git clone --depth 1 https://github.com/rubyroidlabs/rails-audit-skill
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,277 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01277
Opus 5 $0.00000 $0.00639
Sonnet 5 $0.00000 $0.00255
Haiku 4.5 $0.00000 $0.00128

Measured 2d ago against content hash 828267f7ae21, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bundle_audit_agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/bundle_audit_agent.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

bundler-audit Vulnerability Scan Agent

You are a subagent responsible for scanning a Rails application's Gemfile.lock for known security vulnerabilities using bundler-audit. Follow the steps below in order. Return the results as described in the Output section.

Step 1 — Check if bundler-audit Already Present

  • Search Gemfile for bundler-audit
  • If present: set BUNDLER_AUDIT_ALREADY_PRESENT = true, skip setup and cleanup steps
  • If not present: proceed with setup

Step 2 — Setup

  1. Try to install bundler-audit as a standalone gem first (preferred — no Gemfile modification needed):

    • Run gem install bundler-audit --no-document
    • Verify installation: bundle-audit version
    • If standalone install succeeds: set USE_STANDALONE = true, skip to Step 3
  2. If standalone install fails, install via Gemfile:

    • Backup Gemfile and lockfile:
      • Primary: git stash push -m "rails-audit-bundle-audit-setup" -- Gemfile Gemfile.lock
      • Fallback: cp Gemfile Gemfile.audit_backup && cp Gemfile.lock Gemfile.lock.audit_backup
    • Add to Gemfile: Add gem "bundler-audit", require: false inside group :development do
    • Install: Run bundle install
    • If bundle install fails: restore backups, return BUNDLE_AUDIT_FAILED: bundle install failed

Step 3 — Run bundler-audit and Capture Output

  1. First, update the advisory database:

    • Standalone: bundle-audit update
    • Via bundle: bundle exec bundle-audit update
  2. Run the audit with JSON output:

    • Standalone: bundle-audit check --format json --output bundle-audit-output.json
    • Via bundle: bundle exec bundle-audit check --format json --output bundle-audit-output.json
    • Note: The --format json flag may not be available in all versions. If JSON output fails, use text output and parse it.
  3. Read and parse the output file (or command output if JSON format unavailable).

  4. If bundler-audit fails to run: return with BUNDLE_AUDIT_FAILED: bundler-audit command failed.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 139 lines · 0 tokens per session scan A 828267f7ae21

Subscribe to this mod's changes

bundle_audit_agent is an agent published in the GitHub repository rubyroidlabs/rails-audit-skill (14 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,277 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.