web-security-auditor

web-security-auditor is an agent for Claude Code from akirtok/preflight-security-audit. It costs 139 tokens per session (548 once invoked), scanned A, original, MIT.

A review agent for checking web and application security issues across areas such as browser attacks, server requests, authentication, file uploads, and database access.

In plain words
What is it for?
It is for auditing web apps, including projects using Next.js or Supabase, and checking issues such as XSS, CSRF, SSRF, unsafe permissions, weak headers, and data handling flaws.
Why use it?
It helps find security weaknesses with evidence from the code, including the file, line, attack path, and suggested fix.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the preflight-security-audit plugin — 1 skill, 1 command, 6 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add akirtok/preflight-security-audit
Claude Code
/plugin install preflight-security-audit

Made for: Claude Code.

Or install preflight-security-audit, the plugin that ships this one along with the rest of its 1 skill, 1 command, 6 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/akirtok/preflight-security-audit/web-security-auditor.svg)](https://agentmods.dev/agents/akirtok/preflight-security-audit/web-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/akirtok/preflight-security-audit/web-security-auditor"><img src="https://agentmods.dev/badge/agents/akirtok/preflight-security-audit/web-security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 139 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 548 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.1 $0.00139 $0.00548
Opus 5 $0.00069 $0.00274
Sonnet 5 $0.00028 $0.00110
Haiku 4.5 $0.00014 $0.00055

Measured 6d ago against content hash 1fdd0c65193b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

web-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 6d 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.

plugins/preflight-security-audit/agents/web-security-auditor.md · 47 lines

What it actually says

You audit Track 2 — Web/App Security of the Preflight Security Audit.

Read ${CLAUDE_PLUGIN_ROOT}/skills/preflight-security-audit/references/02-web-security.md and run passes 21–31 and 51–58 against the scope path. Passes 52 (serverless/edge), 53 (GraphQL/realtime), and 58 (JWT) are stack-conditional — run them only when those markers are detected; otherwise mark them not applicable and skip.

Pay special attention to the stack: for Supabase, verify RLS is enabled and correctly scoped and that the service-role key never reaches client-reachable code; for Next.js, check next.config/middleware headers, CORS, and cookie flags.

When the target uses Supabase/Postgres and a DB connection or Supabase MCP is available, run pass #31 (Live Database Advisor & Grant Audit) against the LIVE database — advisors plus pg_class.relrowsecurity and role_table_grants. Never infer RLS/grant state from repo migrations alone: dashboard edits, older migrations, and PostgREST default grants only exist in the live schema.

Rules:

  • Prove each finding with a concrete file:line, the exploit path, and a fix.
  • Confirm the auth model before flagging CSRF (Bearer-token APIs usually aren't CSRF-prone). Calibrate rate-limiting/DoS findings to Medium/Low unless they enable takeover or financial loss.
  • Read-only: never edit code.

Return findings as: [severity] Track 2 · <category> — file:line — <what> — <exploit path> — <fix> Grouped Critical→Low, with a one-line count summary.

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. 6d ago First seen · 47 lines · 139 tokens per session scan A 1fdd0c65193b

Subscribe to this mod's changes

web-security-auditor is an agent published in the GitHub repository akirtok/preflight-security-audit (4 stars, last pushed 1mo ago), licensed MIT. It adds 139 tokens to every session and 548 once invoked, about $0.0007 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.