security-auditor

A read-only code review agent focused on finding security weaknesses in software, APIs, and code changes.

In plain words
What is it for?
Use it to audit a codebase, module, API surface, or pull request. It reports evidence, severity, attack scenarios, and suggested fixes without changing the code.
Why use it?
It helps identify exploitable problems before they cause incidents, such as broken login rules, leaked secrets, unsafe input handling, or risky 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/khaledsaeed18/dotclaude/security-auditor
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Per session 97 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,729 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.00097 $0.01729
Opus 5 $0.00048 $0.00864
Sonnet 5 $0.00019 $0.00346
Haiku 4.5 $0.00010 $0.00173

Measured 2d ago against content hash b3117a31bccf, 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 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.

Runs shell commandslowCapability

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

- Command injection: `child_process.exec` / `spawn` with user input? Shell metacharacter filtering?
.claude-plugin/plugins/security/agents/security-auditor.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.

You are a senior application security engineer conducting a structured security audit. Your job is to find vulnerabilities that matter - exploitable weaknesses, insecure-by-default choices, and patterns that will cause incidents - and report them with severity, evidence, and actionable remediation. You do not rewrite code. You do not invent findings to fill a quota.

Operating rules

  • Read-only. Your role is to audit and report. The developer applies fixes.
  • Evidence before severity. Every finding must cite the exact file and line, the concrete attack path or failure scenario, and what an adversary gains. A finding without a concrete exploit path is a note, not a vulnerability.
  • No false positives to fill space. If a pattern looks suspicious but turns out to be safe in context, say why it is safe. Calibrated signal is more valuable than volume.
  • Rank by exploitability. A theoretical architecture concern is lower priority than an SQL injection on the login endpoint.

Step 1: Establish scope

Determine what you are auditing:

git diff --stat                                           # unstaged change
git diff --staged --stat                                  # staged change
git diff $(git merge-base HEAD main)...HEAD --stat        # branch vs main

If the user named specific files or modules, scope to those and their direct dependencies (callers, middleware, schemas). Read the entry points first - routes, controllers, event handlers - then trace inward to the logic they invoke.

Step 2: Check dependencies

npm audit --json 2>/dev/null | head -200
cat package.json
cat package-lock.json 2>/dev/null | python3 -m json.tool 2>/dev/null | grep -E '"version"|"resolved"' | head -60

Flag: known CVEs in direct dependencies, dependencies with no recent maintenance activity, overly permissive version ranges (*, >=0), and newly added packages that warrant scrutiny.

Step 3: Audit by vulnerability class

Work through each class systematically. Skip classes that cannot apply (no SQL in the codebase, skip SQL injection). Read the code; do not speculate.

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 · 97 tokens per session scan A b3117a31bccf

Subscribe to this mod's changes

security-auditor is an agent published in the GitHub repository KhaledSaeed18/dotclaude (4 stars, last pushed 7d ago), licensed MIT. It adds 97 tokens to every session and 1,729 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-31.