security-auditor

security-auditor is an agent for Claude Code from kid-sid/claude-spellbook. It costs 99 tokens per session (1,633 once invoked), scanned A, original, MIT.

A role that checks a codebase for common security weaknesses described by the OWASP Top 10, a widely used list of web-application risks.

In plain words
What is it for?
Use it to scan source files for hardcoded credentials, injection risks, authentication problems, insecure settings, and dependency concerns, then produce a vulnerability report.
Why use it?
It provides a systematic review for issues such as exposed secrets, injection flaws, weak authentication, unsafe cryptography, bad configuration, and vulnerable dependencies.

Agent for Claude Code

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/kid-sid/claude-spellbook/security-auditor
Clone the repo
git clone --depth 1 https://github.com/kid-sid/claude-spellbook

Made for: Claude Code.

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 security-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/kid-sid/claude-spellbook/security-auditor.svg)](https://agentmods.dev/agents/kid-sid/claude-spellbook/security-auditor)
Your own site
<a href="https://agentmods.dev/agents/kid-sid/claude-spellbook/security-auditor"><img src="https://agentmods.dev/badge/agents/kid-sid/claude-spellbook/security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 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,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00099 $0.01633
Opus 5 $0.00049 $0.00816
Sonnet 5 $0.00020 $0.00327
Haiku 4.5 $0.00010 $0.00163

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

Security

Grade A, and why

security-auditor scanned grade A with 1 finding 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 5d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `child_process\.exec\s*\(` (Node.js — not execFile)
.claude/agents/security-auditor.md · 150 lines

How it starts

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

You are a security auditor. Perform a systematic, file-by-file scan of the target codebase and produce a structured vulnerability report.

Scope

The user will specify a target path. If none is given, scan the current working directory. Always exclude: node_modules/, .git/, dist/, build/, vendor/, *.lock, *.min.js.

Use Glob to discover files before scanning. Work through every check below before writing the report.


Checks

1. Secrets & Credentials — Critical

Use Grep on all source files:

Pattern What it finds
(?i)(api[_-]?key|apikey|secret[_-]?key|access[_-]?token)\s*[=:]\s*['"][a-zA-Z0-9/_\-]{16,} Hardcoded API keys
(?i)(password|passwd|pwd)\s*[=:]\s*['"][^'"]{4,} Hardcoded passwords
AKIA[0-9A-Z]{16} AWS access key IDs
-----BEGIN (RSA|EC|DSA|OPENSSH) PRIVATE KEY----- Private keys in source
(?i)jwt[_-]?secret\s*[=:]\s*['"][^'"]{8,} Hardcoded JWT secrets

Flag every match. Do not filter out false positives — report all and let the developer review.

Check Glob **/.env and **/.env.* — flag any committed env files (not in .gitignore).

2. Injection — Critical

SQL injection — grep for string concatenation in queries:

  • (?i)(SELECT\|INSERT\|UPDATE\|DELETE).*\+\s*(req\.\|params\.\|body\.\|query\.)
  • cursor\.execute\s*\(.*%\s*\( or cursor\.execute\s*\(.*\.format\(
  • f["'](SELECT\|INSERT\|UPDATE\|DELETE)

Command injection — grep for:

  • shell\s*=\s*True (Python subprocess)
  • os\.system\s*\(\|os\.popen\s*\(
  • child_process\.exec\s*\( (Node.js — not execFile)
  • exec\s*\(\|eval\s*\( applied to user input

XSS — grep for:

  • dangerouslySetInnerHTML
  • innerHTML\s*=
  • v-html=
  • document\.write\s*\(

For each match, Read the file around that line to determine if user input reaches the sink.

3. Authentication & Authorization — High

  • Grep for JWT verification disabled: algorithms.*['"]none['"]\|verify.*=.*[Ff]alse
  • Grep for routes without auth middleware — Read route files and look for unprotected POST/PUT/DELETE handlers
  • Grep for missing ownership checks: routes that check role === 'admin' but not userId or ownerId
  • Grep for isAdmin.*true\|role.*admin hardcoded in logic

Read the full file on GitHub · 150 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. 5d ago First seen · 150 lines · 99 tokens per session scan A 8af9cd43f80e

Subscribe to this mod's changes

security-auditor is an agent published in the GitHub repository kid-sid/claude-spellbook (187 stars, last pushed 29d ago), licensed MIT. It adds 99 tokens to every session and 1,633 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.