amansingh909/claude-bounty-skills/self-audit

Claude Code and agent skill by amansingh909/claude-bounty-skills

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when reviewing a web app you own or are explicitly authorized to test — a first-party, defensive security self-review that finds issues, helps you fix them, and writes the regression test so they can't come back. Symptoms: "audit my app", "check my own site for security issues", "self-audit my web app", "what should I test on my app", "review my app before others find bugs", "audit what changed in this PR", "did my fix actually work", "re-audit after fixing", pointing these skills at an ass…

Install

npx vskill@latest install amansingh909/claude-bounty-skills/self-audit

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as amansingh909/claude-bounty-skills/self-audit.

self-audit

Overview

You own an app and want to find (and fix) its security issues before someone else does. Given an asset — from your assets/ registry or pasted inline — this skill runs a full defensive loop:

plan → prove (read-only) → prioritize → fix → regression-test → re-verify

and records what it found in a ledger so the next audit starts where this one left off.

It maps the stack to the checks most worth running, hands you a prioritized, concrete test plan, and — if you opt in — runs the read-only subset against your own asset. For anything it confirms, it doesn't stop at "here's a bug": it ranks it by severity, proposes the fix, writes a test that fails now and passes once you fix it, and (after you fix) re-introspects to confirm the fix landed.

This is the one skill in the repo that may run things. It does so only under strict guardrails (below), and every claim it makes is tied to a response it actually observed — so running checks makes the no-fabrication guarantee stronger, not weaker.

Authorization Gate (Critical)

Before issuing any request, confirm the target is one you own or are explicitly authorized to test:

  • If the target is in assets/ (you declared it), that is the confirmation.
  • If it was pasted inline and is not in the registry, ask the user to confirm

ownership/authorization before running anything. Until then, stay advisory.

This skill is defensive: it exists to harden your own apps. It never targets third-party assets without authorization, and it will decline to.

Anti-Hallucination Rule (Critical)

Reason only from what you observe or are given:

  • Do not invent endpoints, parameters, technologies, or versions not stated in

the asset or seen in a real response.

  • Do not claim a vulnerability you have not demonstrated. "Worth checking because

X" until a real response confirms it, then "confirmed: here is the response."

  • Do not claim a fix works because it should — claim it because you re-observed

the config change and the regression test passed (see Close the Loop).

  • If you lack the info to plan (unknown stack, no endpoints), ask — don't pad.

Input

  • An asset file from assets/ (preferred), or an inline description: domain,

tech stack, auth model, notable endpoints.

  • Optionally, output the user already captured (curl/httpx responses) to interpret.
  • Optionally, the asset's prior findings ledger (see below) — read it first so

you re-check what was open and don't re-report what's already fixed or accepted.

  • Optionally, a diff / PR / changed-files list to scope the audit to (see

Audit-the-Diff Mode).

Advisory Plan (default behavior)

Map the stack to the checks that matter, prioritized. Use signals actually present in the asset:

Stack / signalChecks to prioritize
REST/GraphQL API, /api/* with id paramsIDOR / broken object-level authz — increment/swap ids across your own accounts
Role-based access (user/admin panels)Broken function-level authz — request admin routes as a low-priv user
Backend you own (any stack — Supabase, Firebase, an ORM app, GraphQL, serverless)Introspect its authz config directly — the highest-signal first-party check. Read the rules/grants/route-handlers as ground truth and find where a role can reach what it shouldn't. Per-stack specifics in the deep pass below.
Any deployed appExposed secrets (.env, keys in JS bundles, source maps), security headers, cookie flags
Auth flowsSession fixation, weak reset tokens, missing rate limits on login
File upload / renderingStored XSS, SSRF via URL fetchers, path traversal

Output a tight, ordered plan. For each item: what to check, why, and the exact request (e.g. a curl line). Keep it focused — the highest-signal checks for this stack, not a generic OWASP dump.

First-Party Deep Pass — introspect your own backend (highest signal)

Because it's your app, you can do what no black-box tester can: read the backend's own authorization config as ground truth. This is where first-party audits find the criticals that surface probing never will — broken authorization, over-broad permissions, missing auth checks. The principle is stack-agnostic: whatever the backend, enumerate who can do what without proper authorization, read the authz rules/config/code directly, and find the gap between what a role should reach and what it can. Prefer this pass whenever you can authenticate to the backend (its console, management API/MCP, or the source/config repo).

Go to wherever your stack keeps its authorization — a few common ones:

  • Supabase / Postgres RLS (Supabase MCP or a read-only DB connection):

security advisors (get_advisors); anon/authenticated grants on tables & functions (has_function_privilege, role_table_grants); RLS status and USING (true)/WITH CHECK (true) policies; anon-executable SECURITY DEFINER functions with no auth.uid() check (actor passed as a spoofable parameter → RLS bypass); anon-readable views/matviews (matviews can't enforce RLS). These often chain.

  • Firebase / Firestore / Storage: read your security rules — any

allow read, write: if true, rules missing request.auth != null, or checks that trust client-supplied fields. Test against the Firebase emulator; review Storage rules separately from database rules.

  • App-layer authz (Django, Rails, Laravel, Node/Express + Prisma/TypeORM, …):

usually there's no RLS — the check lives in code. Read the route handlers/serializers: endpoints that fetch by id with no ownership/tenant filter (IDOR), admin routes missing a role check, mass-assignment letting a user set fields they shouldn't, ORM queries that forget to scope by the current user/org.

  • GraphQL (Hasura, Apollo, PostGraphile): per-role field/row/column

permissions, unauthenticated queries, whether introspection is exposed in prod, Hasura permission rules with {} (allow-all) filters.

  • Cloud / serverless (AWS Amplify/AppSync, Lambda + API Gateway, Cloudflare

Workers): IAM policies and resource grants (over-broad *), whether API Gateway authorizers are actually attached, AppSync resolver auth rules, public buckets.

  • Any backend: enumerate IAM/role grants, default-open policies, admin

endpoints, and secrets/keys reachable from the client bundle.

Prove it safely. Confirm findings at the config/permission + code level (read-only introspection) rather than by mutating production. A non-mutating live call — a syntactically valid request with a non-existent id that returns a normal result instead of a 401/permission error — confirms reachability without changing any state. Introspection queries stay SELECT/inspection only (see the query-layer guardrail below). Never run a call that could write to prod as part of the audit; hand those to the user as deliberate, advisory steps.

First-Party-Only Checks — the owner's unfair advantage

The deep pass reads your backend's authz config; these are the other checks a black-box tester can't run, because they don't have what you have — the repo, the pipeline, the dependency tree. High signal, mostly read-only, and routinely missed because attack-surface tools never see them:

You haveCheckRead-only tooling
The git repoSecrets in history — a key committed once and "removed" later still lives in historygitleaks detect, trufflehog git file://.
The dependency treeKnown-CVE dependencies — one of the most common real-world breach vectorsnpm audit, pip-audit, osv-scanner; inspect lockfiles
The CI/CD configPipeline misconfig — pull_request_target running untrusted code, over-scoped GITHUB_TOKEN/permissions, secrets echoed to logs, deploy creds in plaintextread .github/workflows/* and other CI config
The IaCCloud misconfig — public buckets, 0.0.0.0/0 ingress, wildcard IAM, unencrypted storesread Terraform/CloudFormation/Pulumi; never apply
The app logicBusiness-logic flaws — TOCTOU races on balances/coupons/inventory, negative quantities, price/qty tampering, replayable one-time actionsread the handler; reason about concurrent and edge inputs

You find these by reading your own source — no live traffic needed. Where one needs a live check to confirm, it obeys the same read-only rule as everything else, and a state-changing confirmation is handed back as an advisory step.

Severity & Prioritization

Don't hand back a flat list — rank each finding so the user knows what to fix first, using the same model as `report-writer` to keep the repo consistent:

  • Severity from data sensitivity × auth required × blast radius ×

preconditions. Unauthenticated + any-user + sensitive data → Critical; self-only + non-sensitive + rare config → Low. State the reasoning; don't just assert a number.

  • Classify with a CWE (e.g. CWE-862 missing authorization, CWE-639 IDOR,

CWE-693 missing security control) so the fix and the regression test have a name.

  • Order the output by fix-first priority (exploitability × impact), not by the

order you happened to find things.

If the user then wants to file this somewhere (an internal ticket, a coordinated disclosure), hand off to report-writer — it takes the same finding and produces the write-up.

Audit-the-Diff Mode — continuous, not big-bang

A full-surface audit is heavy to run every time. When the user points you at a diff, PR, or changed-files list (or asks to "audit what changed"), scope to the delta: which checks above does this change actually touch? A new /api/* route → IDOR/authz; a changed RLS policy or migration → re-run the deep pass on those objects; a new dependency → CVE check; an edited workflow → pipeline misconfig. This makes self-audit a pre-commit / pre-deploy gate, not only a periodic sweep. Cross-check the delta against the findings ledger so a regression in a previously-fixed area is flagged loudly.

Opt-In Active Mode (guardrails)

After presenting the plan, offer to run the read-only subset yourself. If the user accepts, obey ALL of these:

  • Own-asset-only: target passed the Authorization Gate above.
  • Read-only (HTTP): GET/HEAD only. Never POST/PUT/PATCH/DELETE,

never a payload meant to change state. A check that needs a non-GET request is handed back as an advisory step for the user to run deliberately — you do not run it.

  • Read-only (query layer): backend introspection through an MCP or DB

connection is SELECT/inspection only — never INSERT/UPDATE/DELETE/ ALTER/DROP/CREATE/GRANT, even on your own asset. The HTTP rule governs requests; this governs SQL and management APIs. Anything that could write to prod stays advisory-only.

  • Backend introspection (own asset): authenticated read-only management/DB

introspection of your own backend — advisors, schema, grants, RLS status, function source — is allowed and is the preferred way to prove a finding. It changes nothing.

  • Rate-limited: pace requests conservatively; never hammer production.
  • Evidence-bound: report only what a response actually showed; quote/cite it.

Then interpret: what each response means, which checks are clear, which need the user to run the non-GET follow-up.

Close the Loop — fix, regression test, re-verify

Finding a bug is half the job; a defensive audit's real output is fixed, and can't-come-back. For every confirmed finding, offer the full triad:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/amansingh909/claude-bounty-skills/self-audit/badge)](https://verified-skill.com/skills/amansingh909/claude-bounty-skills/self-audit)

Something wrong with this skill or its page? Tell us.