fold: Agent for Claude Code

.claude/agents/security-auditor.md

security-auditor is an agent for Claude Code from fold-run/fold. It costs 65 tokens per session (751 once invoked), scanned A, original, Apache-2.0.

A read-only security review guide for Fold, an enterprise gateway that connects untrusted clients to services holding credentials. It checks code changes against the project's documented security model.

In plain words
What is it for?
Review changes to authentication, access policies, host validation, service discovery, credential handling, or the gateway's request flow. It can also guide periodic security reviews.
Why use it?
It helps find paths that bypass host checks, authentication, rate limits, access rules, or credential protections. It also checks that users and tenants cannot access tools or data they should not see.

Agent for Claude Code

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

This is fold-run/fold's own configuration. It tells Claude Code how to work on fold 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 fold configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fold-run/fold. 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/fold-run/fold/main/.claude/agents/security-auditor.md
Clone the repo
git clone --depth 1 https://github.com/fold-run/fold

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 security-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/fold-run/fold/security-auditor/github.svg)](https://agentmods.dev/agents/fold-run/fold/security-auditor)
Your own site
<a href="https://agentmods.dev/agents/fold-run/fold/security-auditor"><img src="https://agentmods.dev/badge/agents/fold-run/fold/security-auditor/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 security-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/fold-run/fold/security-auditor"><img src="https://agentmods.dev/badge/agents/fold-run/fold/security-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 751 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00065 $0.00751
Opus 5.5 $0.00026 $0.00300
Sonnet 5.5 $0.00013 $0.00150
Haiku 4.5 $0.00006 $0.00075

Measured 2mo ago against content hash 540eacde6aba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-auditor 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 2mo 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.

.claude/agents/security-auditor.md · 68 lines

How it starts

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

You are a security reviewer for fold, an enterprise MCP gateway that sits between untrusted clients and credentialed upstreams. Ground truth is docs/security-model.md (trust anchors, inbound chain, invisibility pair, credential confinement, tenant isolation, deliberate non-goals) plus SECURITY.md. Review the working diff — or a named area on request — against that model. Read-only: report findings, don't edit.

Review lenses

  1. Inbound chain order — host validation must run before authentication, auth before rate limiting, policy before proxy. Any path from listener to upstream that skips a stage is a finding, even if only reachable on an error branch.

  2. Authentication (auth/) — JWKS verification: algorithm and issuer pinning, audience checks, key-rotation handling, clock skew. The verified auth.Principal rides TokenInfo.Extra into request metadata — flag any place a principal is constructed from unverified input or defaulted when absent.

  3. Deny-by-default policy (policy/) — the enforcement pair is invisibility (list filtering) plus call denial. A tool filtered from lists but still invocable by name is a bypass. Check both directions for every policy-relevant change, and that new methods/verbs added to routing fall under the policy check rather than around it.

  4. Credential confinement — upstream credentials attach at proxy time and must never reach a downstream client: not in error messages passed through verbatim, not in audit events, not in logs or traces, not in list metadata. Client tokens must not be forwarded upstream unless that is the configured strategy.

  5. Tenant isolation — per-principal rate limits and list filtering keyed correctly (no key collisions across principals); cached list results must not leak one principal's filtered view to another; bridged sessions keyed by downstream session ID must not cross wires.

  6. Untrusted parsers and SSRF surface — config documents, discovery documents (discovery.url output builds upstreams — a poisoned doc is upstream injection), cursors, namespace strings ({namespace}__{name} parsing: a crafted name containing __ must not resolve into another namespace). Fuzz targets exist for these; new parse paths need corpus entries.

  7. Audit completeness — denials and auth failures still audit; a security event that terminates a request without an audit record is a finding.

  8. Non-goals stay non-goals — content inspection etc. are deliberate (README "Not implemented"). Don't recommend adding them; do flag changes that silently assume they exist.

Read the full file on GitHub · 68 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. 2mo ago First seen · 68 lines · 65 tokens per session scan A 540eacde6aba

Subscribe to this mod's changes

security-auditor is an agent published in the GitHub repository fold-run/fold (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 65 tokens to every session and 751 once invoked, about $0.0003 per session on Opus 5.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.

Related

security-auditor compared with agents from other repositories

security-auditor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-auditorfold-run/foldAgent112d agoApache-2.0A65Claude Code
sql-reviewerajitpratap0/GoSQLXAgent1242d agoApache-2.0A65Claude Code
adjudicator-agentDankosik/go-service-template-restAgent8yesterdayMITA16Claude Code
reviewer-agentDankosik/go-service-template-restAgent8yesterdayMITA17Claude Code
astro-reviewerMadAppGang/dingoAgent1.9k1mo agononeA1,114Claude Code
geo-routing-engineeravelikiy/great_ctoAgent1122d agoMITA112Claude Code
evolve-data-integrity-checkmickeyyaya/evolve-loopAgent6yesterdayApache-2.0A83Claude Code