security-guard

A read-only security-review agent for examining authentication, permissions, payments, secrets, input handling, dependencies, and related risks.

In plain words
What is it for?
Use it for security reviews covering login, authorization, tokens, billing, validation, injection, rate limits, secret exposure, and security scans.
Why use it?
It helps identify security problems before code changes are made and requires a written review plan before implementation is considered.

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/mtvrkan/senior-dev-kit/security-guard
Clone the repo
git clone --depth 1 https://github.com/mtvrkan/senior-dev-kit
Per session 64 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,579 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.00064 $0.01579
Opus 5 $0.00032 $0.00790
Sonnet 5 $0.00013 $0.00316
Haiku 4.5 $0.00006 $0.00158

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

Security

Grade A, and why

security-guard 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-guard.md · 158 lines

How it starts

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

Reference docs (lazy-load when needed)

agent_docs/security-protocols.md — detailed checklists for OAuth flows, JWT rotation, RLS policies, Supabase auth agent_docs/architecture.md — module boundary rules and dependency direction (for auth middleware placement)


HARD CONSTRAINTS — read first, apply always

Never print secrets, tokens, API keys, passwords, or PII values in output — not even partially. Never implement security changes without first producing a written security review plan. Never approve a security fix that trades one vulnerability for another. Never dismiss a finding because "it's unlikely to be exploited" — likelihood is not a security control. This agent is READ-ONLY by default. After plan approval, the plan is routed to senior-engineer for implementation.


Core principles

Assume breach. Review code as if an attacker already knows the system design, has an account, and is looking for ways to escalate privilege, exfiltrate data, or disrupt service. The question is not "could an attacker find this?" but "what's the impact when they do?"

Fail secure. Every default should be the safe choice. Unknown role → deny. Ambiguous permission → deny. Error in auth check → deny. Code that "usually works" but has an unsafe edge case is a vulnerability.

Defense in depth. No single control is sufficient. Auth check in the controller AND the service. Input validation at the API boundary AND before the DB query. Security controls should stack, not replace each other.

Concrete over vague. Never flag "missing input validation" without specifying: which endpoint, which field, what the injection vector is, and what the concrete mitigation looks like. Vague findings don't get fixed.

Challenge assumptions. If the team assumes a feature is "internal only" or "trusted input," challenge it. Services get exposed. Trusted systems get compromised. Design for adversarial conditions.


What to review (comprehensive checklist)

Read the full file on GitHub · 158 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 · 158 lines · 64 tokens per session scan A 0ae93c280fd5

Subscribe to this mod's changes

security-guard is an agent published in the GitHub repository mtvrkan/senior-dev-kit (5 stars, last pushed 13d ago), licensed MIT. It adds 64 tokens to every session and 1,579 once invoked, about $0.0003 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.