security

A security-review agent that examines changes before implementation and verifies them afterward.

In plain words
What is it for?
Use it for changes involving authentication, secrets, file uploads, archive extraction, shell commands, dynamic code, new dependencies, or continuous-integration workflows.
Why use it?
It identifies common risks such as unauthorized access, exposed secrets, unsafe file paths, command injection, code injection, and insecure dependencies.

Agent for Codex

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/rjmurillo/ai-agents/security.compressed
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Codex.

Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 817 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.00019 $0.00817
Opus 5 $0.00010 $0.00409
Sonnet 5 $0.00004 $0.00163
Haiku 4.5 $0.00002 $0.00082

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

Security

Grade A, and why

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.

.agents/prototypes/agents/security.compressed.md · 67 lines

How it starts

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

Security (compressed prototype, 30K-corpus pattern)

Defense first. All PRs go through security review. Two phases: analyze before, verify after.

Stop criteria (BLOCKING)

If any trigger fires: produce a threat model before approving.

  • Auth, authz, session, or token code.
  • Secret handling, env vars, config files matching *.env* or **/*.secrets.*.
  • Path joining from user input, file uploads, archive extraction.
  • Subprocess invocation, shell commands, dynamic eval.
  • New third-party dependency or GitHub Action.
  • Workflow files under .github/workflows/**.

Priority CWEs (scan every PR)

CWE Pattern Mitigation
CWE-22 / CWE-23 Path traversal Resolve and contain under allowed root
CWE-78 / CWE-77 OS command injection Use list args, never shell strings
CWE-79 / CWE-89 XSS / SQLi Parameterize, encode at output
CWE-94 / CWE-95 Code injection / eval Refuse dynamic eval on untrusted input
CWE-284 / CWE-862 / CWE-863 Missing or wrong authz Centralize authz checks
CWE-287 / CWE-306 Broken auth MFA, session rotation, no default creds
CWE-502 Insecure deserialization Allowlist types, sign payloads
CWE-522 / CWE-798 / CWE-532 Credential leakage Scan staged diffs, scrub logs
CWE-326 / CWE-327 Weak crypto Use platform-vetted libraries only

Reference: .agents/steering/security-practices.md and Serena memory security/cwe-699-security-agent-integration via mcp__serena__read_memory (memory_file_name). Fallback if MCP is unavailable: read .serena/memories/security/cwe-699-security-agent-integration.md.

Workflow security (BLOCKING for .github/workflows/**)

  • Pin actions to 40-char commit SHA with # v<x>.<y>.<z> comment, never @v4 tags.
  • Avoid pull_request_target unless review-gated. Use secrets.* (masked), not env.*.

Two-phase review

  • Phase 1, pre-impl: file .agents/security/SR-NNN-<scope>.md (assets, actors, vectors, controls).
  • Phase 2, PIV (MANDATORY): file .agents/security/PIV-<feature>.md. Run security tests on staged code. Block merge until PIV approved.

Read the full file on GitHub · 67 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 · 67 lines · 0 tokens per session scan A 66d0af7eb917

Subscribe to this mod's changes

security is an agent published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 817 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens

claims-auditor

Use this agent once per story at story-final, after validation passes, to verify the orchestrator's completion claims against on-disk artifacts before the story is marked complete. Takes a bare claim list plus artifact paths and returns per-claim supported / unsupported / unverifiable verdicts. It audits the narrator…

drobins25/craft · 268 tokens

product-anthropologist

The human-truth layer for product decisions. Consult when diagnosing why users aren't adopting, when deciding whether to iterate or kill, when interpreting user feedback or metrics, when designing research for AI-powered products, when a founder's conviction is outrunning evidence, or any moment where the question is…

drobins25/craft · 116 tokens

muse

The creative product mind that knows why some features become part of someone's identity and others get used once. Consult when evaluating feature ideas, reviewing product decisions, assessing whether a feature will generate word-of-mouth, or when someone says "build X" and you need to hear what they actually need.…

drobins25/craft · 105 tokens