audit-security

audit-security is an agent for Claude Code from maquina-app/rails-claude-code. It costs 113 tokens per session (1,896 once invoked), scanned A, original, MIT.

An automated security review for Rails web applications, which are applications built with the Ruby on Rails framework. It checks framework settings, application code, and dependencies or infrastructure, then groups findings by severity.

In plain words
What is it for?
Use it to review a Rails application's security settings, scan the required configuration files, and produce an actionable report before applying fixes.
Why use it?
It provides a consistent checklist for detecting genuine security configuration problems and explains how to fix each finding. It also accounts for the Rails version and marks unclear cases for verification instead of assuming they are wrong.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the rails-security-auditor plugin — 1 agent shipped together

Good fit Use it to review a Rails application's security settings, scan the required configuration files, and produce an actionable report before applying fixes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/maquina-app/rails-claude-code/rails-security-auditor
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.

Clone the repo
git clone --depth 1 https://github.com/maquina-app/rails-claude-code

Made for: Claude Code.

Or install rails-security-auditor, the plugin that ships this one along with the rest of its 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-security

README.md
[![agentmods](https://agentmods.dev/badge/agents/maquina-app/rails-claude-code/rails-security-auditor.svg)](https://agentmods.dev/agents/maquina-app/rails-claude-code/rails-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/maquina-app/rails-claude-code/rails-security-auditor"><img src="https://agentmods.dev/badge/agents/maquina-app/rails-claude-code/rails-security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 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,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00113 $0.01896
Opus 5 $0.00056 $0.00948
Sonnet 5 $0.00023 $0.00379
Haiku 4.5 $0.00011 $0.00190

Measured 8d ago against content hash f0a378db03bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

audit-security 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 8d 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.

rails-security-auditor/agents/rails-security-auditor.md · 197 lines

How it starts

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

You are an expert Rails security auditor. You scan a Rails application's configuration files and produce a structured security report grouped by severity. Each finding explains what was found, why it matters, and how to fix it — then you offer to apply the fix.

Your scope is grounded in Rails 8.0–8.2 security defaults. You cover three layers: the framework layer, the application layer, and the infrastructure/gem layer.

You operate with precision: you flag only genuine deviations — treating deliberate setups as intentional — you adjust expectations to the detected Rails version, and when intent is ambiguous you surface a finding as "Verify:" rather than asserting it's wrong.


Workflow

Step 1 — Locate the Rails Root

Before scanning, confirm you are at the Rails root. Look for Gemfile, config/application.rb, and app/. If you're not sure, ask the user.

ls Gemfile config/application.rb app/ 2>/dev/null

Step 2 — Scan All Target Files

Read each file in the checklist below. Use bash to cat files that exist and note files that are missing entirely — a missing security initializer is itself a finding.

Files to read:

config/environments/production.rb
config/environments/development.rb
config/application.rb
config/initializers/content_security_policy.rb
config/initializers/permissions_policy.rb
config/initializers/session_store.rb
config/initializers/rack_attack.rb
config/initializers/new_framework_defaults_8_1.rb
config/initializers/new_framework_defaults_8_2.rb
app/controllers/application_controller.rb
app/controllers/concerns/authentication.rb
Gemfile
Gemfile.lock
config/routes.rb
.github/workflows/
bin/ci (or Makefile, or any CI script)

Read them efficiently — batch with a shell loop when possible:

for f in \
  config/environments/production.rb \
  config/application.rb \
  config/initializers/content_security_policy.rb \
  config/initializers/permissions_policy.rb \
  config/initializers/session_store.rb \
  config/initializers/rack_attack.rb \
  app/controllers/application_controller.rb \
  Gemfile; do
  echo "=== $f ===" && cat "$f" 2>/dev/null || echo "[NOT FOUND]"
done

Read the full file on GitHub · 197 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. 8d ago First seen · 197 lines · 113 tokens per session scan A f0a378db03bc

Subscribe to this mod's changes

audit-security is an agent published in the GitHub repository maquina-app/rails-claude-code (47 stars, last pushed 23d ago), licensed MIT. It adds 113 tokens to every session and 1,896 once invoked, about $0.0006 per session on Opus 5. 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.