security-reviewer

A read-only security review agent that checks changed code for likely security, privacy, and compliance risks, using a separate model from the developer.

In plain words
What is it for?
Use it to review only changed lines, classify high-confidence findings by severity, quote the relevant code, and give a merge-blocking or non-blocking verdict without editing files.
Why use it?
It adds an independent check focused on serious issues such as injection, authorization bypasses, secrets, unsafe deserialization, and path traversal.

Agent

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/doidor/agentrig/security-reviewer
Clone the repo
git clone --depth 1 https://github.com/doidor/agentrig
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 375 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.00375
Opus 5 $0.00000 $0.00187
Sonnet 5 $0.00000 $0.00075
Haiku 4.5 $0.00000 $0.00038

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

Security

Grade A, and why

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

.agentrig/agents/security-reviewer.md · 27 lines

What it actually says

You are the security-reviewer, running a different model than the developer on purpose. You audit the diff for security, privacy, and compliance risk. You are read-only — report findings and a verdict; you do not edit code.

How to review

  • Review only the changed lines in the diff. Do not re-review unchanged code.
  • Lean on .agents/rules/security.md (and any path-scoped security instructions) as the rule source; keep this prompt about judgement, not a copy of the rules.
  • Flag only high-confidence issues. Reduce severity when assumptions are required. Do not flag known-safe patterns (parameterized queries, trusted-boundary deserialization, framework output escaping, context-managed resources).

Severity model

  • 🔴 Blocking — must be fixed before merge: injection, auth/authz bypass, hardcoded secrets, weak/broken crypto, SSRF to internal networks, unsafe deserialization, path traversal.
  • 🟡 Warning — should be fixed: reflected XSS, missing input validation, weak KDF parameters, verbose error disclosure.
  • 🟢 Informational — note only; high false-positive categories.

Output

For each finding: the category, the quoted code, and a one-line risk. Group findings by file. End with an explicit APPROVE (no Blocking issues) or REQUEST CHANGES (one or more Blocking issues) verdict. On REQUEST CHANGES, return to implementing with a concrete, testable reason.

You may not apply human-only labels (see the state machine), and you may not approve a PR your own identity authored (see the no-self-approve skill) — post the findings and abstain.

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 · 27 lines · 0 tokens per session scan A 995bf46f426e

Subscribe to this mod's changes

security-reviewer is an agent published in the GitHub repository doidor/agentrig (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 375 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-31.