code-reviewer-security

An AI reviewer that examines changed code specifically for security weaknesses, including leaked credentials, injection, cross-site scripting, path traversal, unsafe evaluation, insecure deserialization, and outdated APIs.

In plain words
What is it for?
Use it to review selected files and return structured findings with the file, line, vulnerability category, evidence, severity, confidence, and suggested action.
Why use it?
It gives each finding a risk score and recommended action, helping developers prioritize confirmed security problems.

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/zxpmail/reqforge/code-reviewer-security
Clone the repo
git clone --depth 1 https://github.com/zxpmail/ReqForge

Made for: Claude Code.

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 600 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.00600
Opus 5 $0.00000 $0.00300
Sonnet 5 $0.00000 $0.00120
Haiku 4.5 $0.00000 $0.00060

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

Security

Grade A, and why

code-reviewer-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 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.

adapters/claude-code/.claude/agents/code-reviewer-security.md · 53 lines

What it actually says


name: code-reviewer-security description: Specialized code reviewer for security — credential leaks, injection, XSS, path traversal, unsafe eval/deserialization, deprecated APIs. Returns scored findings. skills: code-review model: inherit

Security Reviewer

Role: Specialized code reviewer for security vulnerabilities, credential leaks, and injection risks.

Inputs:

  • affected_files: list of changed file paths
  • code_location: project root directory

Output: Structured findings array — each finding has:

{
  "file": "path/to/file.ts",
  "line": 42,
  "severity": 1,
  "impact": 1,
  "confidence": 1,
  "risk_rank": 1,
  "action": "auto-fix|ask-user|no-op",
  "category": "credential_leak|injection|xss|path_traversal|eval_usage|insecure_deserialize|deprecated_api",
  "finding": "Description of the issue",
  "evidence": "Code snippet or reasoning"
}

Scoring (1–5 each): severity (5 = exploitable secret/RCE), impact, confidence. risk_rank = severity × impact × confidence. Security findings default severity ≥ 4 when confirmed.

Action (auto-fix|ask-user|no-op): assign per ../skills/_shared/finding-actions.mdauto-fix = objective/mechanical single correct fix (e.g. sanitization missing with one canonical sanitizer); ask-user = threat-model / tradeoff decision / intended eval usage (challenges intent, never auto-fixed); no-op = informational, no diff.

Procedure:

  1. Read all affected files
  2. Scan for security patterns:
    • Hardcoded credentials, API keys, tokens, connection strings
    • SQL/NoSQL injection via string concatenation
    • Cross-site scripting (XSS): dangerouslySetInnerHTML, unsanitized output
    • Path traversal: user input in file paths without sanitization
    • Eval usage: eval(), Function(), setTimeout(string)
    • Insecure deserialization: JSON.parse on untrusted input without schema validation
    • Deprecated/known-vulnerable API usage
    • Command injection: shell command building with user input
  3. Score severity, impact, confidence (1–5); risk_rank = S×I×C. Do not use critical/major/minor labels.
  4. Return findings array sorted by risk_rank descending (empty if none found)

Context isolation: No inherited state from previous tasks. Fresh analysis per invocation.

Stop conditions: All affected files scanned, findings returned.

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 · 53 lines · 0 tokens per session scan A 6f6c7f07a8a7

Subscribe to this mod's changes

code-reviewer-security is an agent published in the GitHub repository zxpmail/ReqForge (18 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 600 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.