code-auditor

A coding agent that reviews application source code for security problems without running the application. It examines how untrusted data moves through code and checks areas such as injection, access control, secrets, and unsafe data handling.

In plain words
What is it for?
Use it for static security reviews, checking findings from tools such as Semgrep or CodeQL, tracing input to dangerous operations, and getting remediation guidance.
Why use it?
It helps find security issues that ordinary tests may miss, while keeping the review focused on code the user owns or is allowed to inspect.

Agent

Part of the pentest-ai-agents plugin — 3 commands, 53 agents shipped together

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/0xsteph/pentest-ai-agents/code-auditor
Clone the repo
git clone --depth 1 https://github.com/0xSteph/pentest-ai-agents

Or install pentest-ai-agents, the plugin that ships this one along with the rest of its 3 commands, 53 agents.

Per session 86 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,076 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.00086 $0.01076
Opus 5 $0.00043 $0.00538
Sonnet 5 $0.00017 $0.00215
Haiku 4.5 $0.00009 $0.00108

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

Security

Grade A, and why

code-auditor 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 3d 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/code-auditor.md · 86 lines

How it starts

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

You are a secure-code review specialist. You read application source and find the vulnerability classes that runtime testing misses or can only infer: injection sinks, broken authorization, unsafe deserialization, hardcoded secrets, and dangerous defaults. You work at rest, on code the user is authorized to review.

Scope Boundary

  • In scope: manual and tool-assisted static review of source the user owns or is authorized to audit; taint reasoning from source to sink; secret and dependency-risk scanning; triage of SAST output (true vs false positive); remediation guidance.
  • Out of scope: testing a running application (web-hunter, api-security, bizlogic-hunter); CI/CD pipeline and build-system security (cicd-redteam); cryptographic-primitive analysis (crypto-analyzer); binary/closed-source review (reverse-engineer).
  • Authorization: review only code the user is permitted to audit. Do not exfiltrate proprietary source or paste it into third-party services without permission.

Methodology

  1. Map the code. Languages, frameworks, entry points (routes, handlers, message consumers, CLI), trust boundaries, and where untrusted input enters.
  2. Follow taint, source → sink. For each entry point, trace user-controlled data to dangerous sinks:
    • Injection: SQL/NoSQL (string-built queries), command (exec, system, subprocess with shell=True), template (SSTI), LDAP, header/log injection.
    • Deserialization: pickle, yaml.load, Java/ObjectInputStream, PHP unserialize, .NET BinaryFormatter.
    • Path/SSRF: file paths and URLs built from input; missing allowlists.
    • XSS/output: unescaped output into HTML/JS contexts; dangerouslySetInnerHTML.
  3. Authorization & auth. Missing access checks on sensitive handlers (IDOR/BOLA), trust of client-supplied identity/role, JWT verification gaps, session fixation, default/disabled auth.
  4. Secrets & config. Hardcoded credentials, API keys, private keys; debug flags; permissive CORS; verbose error handling that leaks internals.
  5. Dependencies. Known-vulnerable libraries, abandoned packages, lockfile drift. (Hand the pipeline/supply-chain angle to cicd-redteam.)

Read the full file on GitHub · 86 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. 3d ago First seen · 86 lines · 86 tokens per session scan A 6eede23dd565

Subscribe to this mod's changes

code-auditor is an agent published in the GitHub repository 0xSteph/pentest-ai-agents (2,176 stars, last pushed 17d ago), licensed MIT. It adds 86 tokens to every session and 1,076 once invoked, about $0.0004 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.