Get new AI skills and notes from Sujan by emailNew AI skills by emailAI skills by email

No Wind Days
← Back to the AI Skills Library

Security Audit

Runs a pre-merge or pre-publish security audit across auth, row-level security, client secrets, input validation, abuse controls and headers with attacker scenarios.

Skill fileIn testing

Web QA & Dev

Download .md

How to use this

  1. Add the skill to your AI assistant. Copy it or download SKILL.md, then follow the how-to guide for Claude, ChatGPT, Grok or Cursor.
  2. Give it what it needs: The repo or staging preview, routes, auth setup and database or storage policies in scope.
  3. Ask for the work. For example: Use the security-audit skill to audit this app before we merge and list findings with attacker scenarios and a READY block.
  4. What you get back: A severity-ranked finding list with exact locations, attacker paths, evidence states, minimal fixes and a four-field READY handoff block.

When to use it: Use before merging or publishing a web app, API, or site change to audit auth, secrets, tenant isolation/RLS, and trust boundaries with attacker scenarios and evidence states.

Security Audit

Run an evidence-based pre-merge or pre-publish security audit covering auth, data isolation, secrets, input handling, and abuse vectors. Never exploit real user accounts, exfiltrate real data, or run destructive scans.

1. Attack-Surface Census

List every entry point in scope before auditing:

  • Public routes, forms, and redirects
  • Auth flows (sign-up, login, magic links, OAuth, password reset, session/cookie handling)
  • API routes, server actions, webhooks, and background jobs
  • Database tables, row-level security (RLS) policies, and file storage buckets
  • Client-side JS bundles, environment config, and third-party/AI integrations

2. Core Security Checks

  1. Authentication & Sessions: Verify secure cookies (HttpOnly, Secure, SameSite), token expiry, logout invalidation, and CSRF/CORS boundaries.
  2. Authorization & Tenant Isolation: Test for IDOR and broken object-level access. For Supabase or similar BaaS, inspect RLS policies on every table and bucket—confirm anon and authenticated keys cannot read, update, or delete another user's records.
  3. Secrets & Client Leaks: Check client bundles, public repos, env examples, and error payloads for API keys, service-role keys, tokens, or internal endpoints.
  4. Input Validation & Injection: Check for XSS, SQL/NoSQL injection, SSRF, path traversal, open redirects, and unsafe file uploads.
  5. Abuse & Cost Controls: Verify rate limiting on auth, email, and paid AI endpoints; confirm webhook signature verification; check client-supplied prices, credits, or roles cannot be tampered with.
  6. Transport & Headers: Confirm HTTPS, security headers (CSP, frame protection, X-Content-Type-Options), and safe error messages (no stack traces in production).

3. Required Finding Format

List findings most severe first (Blocker / Major / Minor). Every finding must include:

  • Location: exact file, route, table, or policy
  • Attacker scenario: concrete step-by-step path an attacker would take
  • Counterevidence checked: mitigating controls checked and confirmed absent or bypassable
  • Evidence state: Confirmed (reproduced or proven in code/config), Likely (not tested live), or Needs manual check
  • Recommended fix: minimal, concrete remediation

4. Coverage Status & READY Handoff Block

State overall audit coverage explicitly as Complete, Partial, or Not Assessed per area, then close with the required four-field block:

  • Verified: areas and controls audited and confirmed safe.
  • Unverified: areas not inspected or needing live credentials/runtime access, and why.
  • Failed or skipped: open security findings or skipped checks.
  • Also changed: files or test fixtures touched (or "None — read-only audit").

Informal sign-offs do not count. Any code or config change after the audit requires a fresh block for the changed surface.