/eng:security-audit [phase] [path]from Engineering Skills
Manually invoked. Red-team application-security review across frontend and backend, mapped to the OWASP Top 10 2025 and API Top 10 — access control, SSRF, CSRF, headers and CSP, sessions with operator step-up, the trusted client IP, field encryption and keys, uploads and user files, injection and XSS, abuse cases, the audit trail, cookie consent, supply chain and fail-open handling — naming the domain audits for depth rather than repeating them.
Ships in Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run this only when the user asks for it by name. It writes a report and changes no code; fixing a finding is a separate request.
A manually-invoked, red-team security audit of an app or a specific diff/PR. It is self-contained — every check is spelled out inline, so it runs a full review with zero other skills installed — and each finding is verified against the real code before it lands in a phase-aware, scored report at _reports/security-audit.md.
Self-contained — this checklist is comprehensive on its own and needs no other skill installed. Where the house skills
backend-security,frontend-security,field-encryption,image-handling,audit-logandcookie-consentare installed, they are the fix target for what this finds; rules files themselves →firebase-security-rules-auditor.
Before applying this skill, read the project's root AGENTS.md, the AGENTS.md closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
[phase] — development | production; sets the action-item tiers. Omitted → the audit phase the project's AGENTS.md records, else production (assume the app is live until told otherwise).[path] — a file, directory, or PR/diff to scope the audit to; omitted → the whole repo.Mindset — reviewer/attacker first. Don't assume code is fine because it looks careful; find the sequence that breaks it. Report only findings you can justify as real, each verified before it lands.
AGENTS.md; else production, so a CRITICAL finding gets Fix-Now urgency instead of a pre-launch discount._reports/security-audit.md exists, read it, but still run every check against the source. Use it only to keep the ID of each finding still present (status UNRESOLVED), carry its WON'T FIX findings forward unchanged — never re-raised as new findings — drop its FIXED findings and any no longer present, continue ID numbering from its highest ID, and take its scores for the score-change row. First run → mark all NEW.file:line evidence.AGENTS.md or a doc it links._reports/security-audit.md — overwriting the whole file, so no resolved history accumulates — and post the chat summary (see Output). Recommend fixes in the report; never modify code. Never commit or push without explicit approval.Findings are ordered worst-first in the report.
Write to _reports/security-audit.md in the format in references/report-format.md: the header line, the score change with its one Overall row, the findings table with its status legend and one section per finding, the scorecard and phase-tiered action items.
Every run produces two things:
_reports/security-audit.md, in the format above, overwriting the prior run.<X>/10 (with Δ vs last run), a severity count (Critical / High / Medium / Low, i.e. C / H / M / L), the top findings worst-first (id · severity · one-line · file:line), and the report path. Note any "needs confirmation" items.Report-only — this audit recommends fixes in the report; it never modifies code.
Run the backend blocks for server and API code and the frontend blocks for browser code, each mapped to the OWASP Top 10 2025 and the API Security Top 10 2023. This audit is the umbrella: it checks each risk at the level of "is the control there and does it hold", and where a domain audit is installed, it names that audit for the depth instead of repeating it — access-control-audit (every guard and verb), api-audit (route discipline), env-audit (env and secrets), dependency-audit (packages and advisories), firestore-audit and redis-audit (data-layer rules and failure directions). A domain that isn't installed gets its row checked here in full.
A01 Broken Access Control · API1 · API3 · API5
Origin on the allowlist (falling back to Referer), and Sec-Fetch-Site: cross-site refused; responses that vary on them send Vary. A GET never changes state. A Server Action authorises and validates on its own, like any POST, and experimental.serverActions.allowedOrigins names only a known proxy.A02 · API8 Security Misconfiguration
*; debug and local-only routes absent on deployed tiers. Absolute URLs (an email's link, a redirect) come from configured origins, never Host or X-Forwarded-Host.X-Firebase-AppCheck. The web API key restricted to its APIs and domains and per tier — needs confirmation, a console setting.A04 Cryptographic Failures
timingSafeEqual, both sides hashed first), never ===; every token from a secure random source.authTagLength: 16 on decipher; a versioned format naming the key (v1:…); the record's collection, id and field bound as associated data, so a ciphertext copied elsewhere fails. Decrypt fails closed with a generic error and never returns the stored bytes.A05 Injection
A06 Insecure Design · API6 · API4
Idempotency-Key replaying the stored response.A07 Authentication Failures · API2
httpOnly, Secure, SameSite cookie named __Host- or __Secure-; an absolute session cap; sign-out ending the session on the server; passwords to NIST length with a breach check and no composition rules; generic answers that don't reveal which addresses have accounts. Tokens verified with their algorithm, issuer and audience pinned.A08 Software or Data Integrity Failures
Uploads and user files (A01 · A05 · A06) — OWASP File Upload Cheat Sheet
file-type) checked against an allowlist, never the client's contentType or the extension, and the real type is stored as the object's contentType. The caps live in one module that the browser check, the server check and the storage rules all read; the server assumes the browser check never ran.sharp's limitInputPixels) and re-encoded before they're served; orientation is applied, then EXIF stripped, GPS never kept. A user's SVG is never served as an image — rasterised or refused.Content-Disposition: attachment on a download.performance-audit's.A09 Security Logging and Alerting Failures
env-audit's.api-audit's; here, what the entry is worth. Each holds an action from one typed list, the result (refusals and failed step-ups included), the scope, the actor's kind and id with their email copied in (and both people when an operator acts as a customer), the target with before and after for the fields that matter, and the IP, user agent, request id and server time in UTC — never a secret, token or password.after() and retries, a final failure logged and alerted; inside the change's transaction where both must exist. A dangling promise or an audit write that can fail the request is a finding.A10 Mishandling of Exceptional Conditions
API9 · API10
XSS (A05)
dangerouslySetInnerHTML only through one sanitising component sharing the server's policy, with named props sanitised against DOM clobbering; user links checked against the shared URL schema (http/https); no eval, new Function or string setTimeout; untrusted values kept out of style, spread props and non-React sinks (location, router.push, window.open, innerHTML, insertAdjacentHTML, document.write); JSON-LD escapes <; an uploaded SVG is never inlined.Headers and CSP (A02)
Strict-Transport-Security (max-age=63072000; includeSubDomains), nosniff, Referrer-Policy, X-Frame-Options: DENY unless the app is built to be embedded and names its ancestors, Permissions-Policy, Cross-Origin-Opener-Policy (allowing popups where sign-in needs them), Cross-Origin-Resource-Policy, Cache-Control: no-store on signed-in responses, no X-Powered-By, and X-XSS-Protection absent or 0. (Owned here; other audits point to it.)default-src, object-src 'none', base-uri 'none', frame-ancestors ('none', or the named ancestors of an embeddable app), form-action, upgrade-insecure-requests, and explicit connect-src, img-src and frame-src lists; a reporting endpoint (Reporting-Endpoints with a report-uri fallback). 'unsafe-eval' only on the local tier, branched on APP_ENV, never NODE_ENV. Under Cache Components, script-src 'unsafe-inline' recorded as a known gap is not a finding; a per-request app uses the nonce route, with the proxy skipping prefetches. Trusted Types stays report-only until its prerequisites are in place. Whether the policy went report-only before enforcement needs confirmation.Cross-window and embeds
postMessage sends to a named target origin, never "*", and receiving checks the origin and validates the payload; target="_blank" links carry rel="noopener noreferrer"; embeds sandboxed, with allow-scripts and allow-same-origin together only for cross-origin documents.Secrets, tokens and navigation (A04)
NEXT_PUBLIC_* secrets are env-audit's); no auth token in localStorage or sessionStorage; no service worker caching signed-in responses; credentials: "include" only to your own origins, never mode: "no-cors" to dodge CORS; no PII in URLs or analytics; no production source maps; ?redirect= followed only for a path on this site; sign-out sends Clear-Site-Data.Cookie consent — privacy, not an OWASP category: ePrivacy Article 5(3), GDPR, the EDPB cookie banner taskforce and Nigeria's NDPA
localStorage, pixels, embeds (a click-to-load placeholder until then); a non-essential cookie the server sets reads the choice first. Analytics and tag-manager gating is seo-aeo-geo-audit's; whether a first visit with a cleared profile makes no non-essential request needs confirmation in a browser.accessibility-audit's.Supply chain (A03)
dependency-audit's — run it.Fixing is a separate request, after the report is written, and covers only the findings the owner chose. Then update the report in place — never re-run the audit to update it: a re-run re-checks the whole codebase, costs a full audit and raises new findings mid-fix. Mark each fixed finding FIXED with its commit and a one-line note of what changed, mark a finding the owner rules out WON'T FIX with their reason, and leave everything else as it stands. Recompute the scorecard categories the fixes touched and the Overall, and rewrite the one score-change row (previous → current) — never add a second row.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timonwa/engineering-skills --plugin eng20 skills in this plugin
/agents-mdWrites or updates a project's AGENTS.md and the short AGENTS.md notes in each app and package — what an agent can't work out from the code: commands, structure, conventions that differ from the defaults, workflow, recorded deviations from the house standards and hard constraints, under 200 lines. Use when starting a project, setting up AGENTS.md or CLAUDE.md, or bringing a project's agent instructions up to date./audit-allManually invoked. Runs the house audit suite across the eng, fe and be sets — detects what the repo has, runs every installed audit that applies (codebase, conventions, dependencies, env, security, accessibility, frontend, performance, SEO/AEO/GEO, Storybook, content, API, access control, Firestore, Redis), and rolls their reports into one health report with an overall score and cross-cutting priorities. Each audit still writes its own report./Other plugins' skills for the same job