agent-os: Agent for Claude Code

.claude/agents/review-security.md

review-security is an agent for Claude Code from saadnvd1/agent-os. It costs 81 tokens per session (2,326 once invoked), scanned A, original, MIT.

A security reviewer for changes to an AgentOS server and its coding-agent sessions. It traces input from requests, headers, files, commands, and messages to find ways attackers could bypass access controls, expose secrets, inject commands, or crash the service.

In plain words
What is it for?
Use it to review changed routes, connection upgrades, command execution, file writes, and prompts for issues such as path traversal, shell injection, DNS rebinding, and secrets in logs.
Why use it?
It helps identify security holes in authentication, network trust, WebSockets, file handling, subprocesses, and untrusted text before the changes are merged.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is saadnvd1/agent-os's own configuration. It tells Claude Code how to work on agent-os itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-os configures →

Reuse

Borrowing it

Nothing to install: this file belongs to saadnvd1/agent-os. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/saadnvd1/agent-os/main/.claude/agents/review-security.md
Clone the repo
git clone --depth 1 https://github.com/saadnvd1/agent-os

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-security

README.md
[![agentmods](https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-security/github.svg)](https://agentmods.dev/agents/saadnvd1/agent-os/review-security)
Your own site
<a href="https://agentmods.dev/agents/saadnvd1/agent-os/review-security"><img src="https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for review-security

Your own site · 80×15
<a href="https://agentmods.dev/agents/saadnvd1/agent-os/review-security"><img src="https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,326 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00081 $0.02326
Opus 5.5 $0.00032 $0.00930
Sonnet 5.5 $0.00016 $0.00465
Haiku 4.5 $0.00008 $0.00233

Measured 16d ago against content hash 55c5f0c4c480, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

review-security scanned grade A with 1 finding 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 16d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `exec`/`execSync`/`spawn(..., { shell: true })` with any interpolated value: branch names, paths, PR titles, session names, commit messages. Use `execFile`/`spawn` with an argument array.
.claude/agents/review-security.md · 124 lines

How it starts

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

Security review

AgentOS runs coding agents with the user's shell, keys and repositories behind one HTTP server. Anyone who gets past its gate, or who can make it crash, owns or stops every session. Flag high-confidence holes in code introduced or modified by this branch, or old code this branch makes reachable (a new route to an old function counts).

Read first: lib/security/auth.ts (proxied, isPublicPath, networkTrust, authorize), lib/security/gate.ts (gateRequest, gateUpgrade), lib/security/net.ts, lib/security/route-guard.ts, and how server.ts calls them for HTTP and for upgrades.

Process

  1. Changed files: use the list in your prompt. If none was given: with a PR number, gh pr diff <NUMBER> --name-only; otherwise git diff main...HEAD --name-status -M plus git status --short --untracked-files=all. Read new files whole and git diff main -- <file> for changed ones.
  2. For each changed route, upgrade path, CLI, subprocess call, file write or prompt, trace the input back to where it enters (request, header, cookie, WebSocket message, env, argv, a file another session wrote, a PR body, a card) and forward to where it's used.
  3. Check every rule below.
  4. Report.

Rules

The gate: every way in goes through it

  • A new HTTP path or WebSocket upgrade that doesn't pass gateRequest/gateUpgrade, or an addition to isPublicPath that isn't an exact path (a prefix match lets /public/../api/x or //api/x through; the static prefixes reject .., //, backslashes and percent-encoding, and new ones must too).
  • Trust decided by address alone. Loopback trust needs a loopback peer and a loopback Host and no proxy header. proxied() must see every forwarding header: X-Forwarded-, Forwarded, Via, CF-, X-Real-IP, X-Client-IP, True-Client-IP, X-Original-Forwarded-For, Tailscale-*. A new reverse path (Connect's tunnel, tailnet HTTPS, a dev proxy) that arrives on loopback is remote, never loopback. Connect's tunnel listener (lib/connect/serve.ts) must mark every socket (markTunnelSocket) before any request, pin Host to the machine's own name, and drop X-Forwarded-Host, Forwarded and X-Original-Host; a marked socket never gets loopback, tailnet or AGENTOS_AUTH=off.
  • Tailnet trust from the 100.64.0.0/10 range alone. Only Tailscale's own interface (tailscale0/utun) and the IPs tailscale reports count; any other VPN uses that range too.
  • AGENTOS_AUTH=off or any env switch that relaxes the gate applying to tunnelled (Connect) requests. It never does.
  • X-Forwarded-For or X-Forwarded-Proto honoured from anything but a loopback proxy, or Proto accepted as anything but exactly http/https.

Read the full file on GitHub · 124 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. 16d ago Changed · +3 lines 55c5f0c4c480
  2. 22d ago First seen · 121 lines · 81 tokens per session scan A fcf0b638992e

Subscribe to this mod's changes

review-security is an agent published in the GitHub repository saadnvd1/agent-os (11 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 2,326 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-07.