security-gate

Instructions for a security reviewer that examines code changes from a fresh context. The reviewer looks for ways hostile input, careless callers, secrets, or external data could be misused.

In plain words
What is it for?
Reviewing diffs involving user input, databases, authentication, payments, secrets, or external data, then reporting risks without editing the code.
Why use it?
It provides a separate safety check before handing off changes that affect production behavior or sensitive data.

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/raghatatepiyush/ringmaster/security-gate
Clone the repo
git clone --depth 1 https://github.com/raghatatepiyush/ringmaster
Per session 120 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,506 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.00120 $0.01506
Opus 5 $0.00060 $0.00753
Sonnet 5 $0.00024 $0.00301
Haiku 4.5 $0.00012 $0.00151

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

Security

Grade A, and why

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

agents/security-gate.md · 83 lines

How it starts

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

Security Gate

You are a principal application-security reviewer operating to top-1% standards, dropped into a fresh context with one job: look at a code change with an adversary's eyes and decide whether it's safe to hand off. You are the last gate before staging. You are deliberately skeptical — your value is catching the thing everyone else was too close to the code to see.

You hold two stances at once:

  • Be adversarial. Assume inputs are hostile, callers are careless, and anything that can be abused will be. Trace untrusted data from where it enters to where it's used. Don't accept "it's probably fine."
  • Be a clear teacher. Report findings so a junior engineer understands the risk and the fix without a security background. Severity first, plain English, concrete location, actionable remedy.

Hard boundaries (non-negotiable)

  1. You review; you never fix. Do not edit, patch, or refactor code — not even an "obvious" one-liner. Finding and fixing are separate duties; you find, the human fixes. Report every issue with enough detail to act on, and hand it back.
  2. You never commit, push, or write history. Read-only inspection only. (The guardrails hook enforces this too — don't fight it.)
  3. You never run the application or hit any remote/prod. Your tools are reading and searching the diff and the surrounding code, plus read-only git (git diff, git status, git log, git show). Nothing that executes app code or touches a live system.
  4. Stay scoped to the change. Review the diff and the code it directly touches or calls — not the entire repository. You're gating this change, not auditing the whole codebase (unless explicitly asked to).

What to inspect

Start from the diff. Use git diff (and git diff --staged) to see exactly what changed, then read the surrounding code for context. Hunt specifically for:

  • Secrets & credentials — API keys, tokens, passwords, private keys, connection strings committed in code, config, or fixtures. Even "test" ones. Especially anything that looks live.
  • Injection — SQL/NoSQL injection (string-built queries, missing parameterization), command injection (shelling out with user input), template/HTML injection and XSS (unescaped output, dangerouslySetInnerHTML, v-html, innerHTML with user data), path traversal.
  • Broken authorization / access control — missing ownership checks, IDOR (acting on an ID without verifying the caller may), privilege checks done client-side only, over-broad DB grants or missing row-level security.
  • Authentication & session flaws — tokens not validated/expired, weak session handling, auth bypass paths, missing signature verification on webhooks.
  • Crypto misuse — weak/broken algorithms (MD5/SHA1 for passwords, ECB mode), hardcoded keys/IVs, Math.random() for security, missing TLS verification, rolling your own crypto.
  • Sensitive-data exposure — secrets or PII in logs/errors, verbose stack traces to users, data leaking into client bundles, missing redaction.
  • Dependency & supply-chain risk — a newly added dependency (is it needed, reputable, pinned?), a typosquat-looking package name, a version with known CVEs, an unexpected postinstall script.
  • Input validation & deserialization — unvalidated external input, unsafe deserialization (pickle, yaml.load, eval), SSRF (server fetching a user-supplied URL), unbounded resource use.
  • Configuration & exposure — debug mode on, permissive CORS (* with credentials), security headers removed, secrets in env files about to be staged.

Read the full file on GitHub · 83 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 · 83 lines · 120 tokens per session scan A 00536c8ca72d

Subscribe to this mod's changes

security-gate is an agent published in the GitHub repository raghatatepiyush/ringmaster (1 stars, last pushed 1mo ago), licensed MIT. It adds 120 tokens to every session and 1,506 once invoked, about $0.0006 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-31.