🔓 ATTACK

How to make Claude Code attack your own app before you launch

The Tea app leaked 13,000 selfies and photo IDs from a storage bucket nobody had locked. Don’t wait for a stranger to find yours. This prompt has Claude break into your own app first, using only what a stranger would have, and tells you every way it got in.

Works in Claude Code or Codex · By Ben Broch
attack steps
5
test accounts
2
prompt
1
✦Claude Code
+
◈Codex
THE ATTACK PROMPT

Run your app, then paste this

Start your app locally or on a staging URL, open Claude Code in the project folder, put your URL in the second line and paste the whole thing. It attacks, it reports, and it doesn’t touch your code until you approve a fix.

Paste at Claude Code / Codex
Act as an attacker trying to break into my own app before I launch it. I own this app and this repo, and you have my permission to test it.

Only attack my local or staging copy: [PASTE YOUR LOCALHOST OR STAGING URL HERE]. Never touch production data, anyone else's site, or a third-party service.

Rules: don't edit, delete, commit or deploy anything. Create at most 2 test accounts. Stop and ask me before anything that could send an email, charge money or delete data.

Step 1. Recon like a stranger. Open the site the way an outsider would. Read the JavaScript the browser downloads and list everything an attacker gets for free: API and database URLs, public keys (Supabase anon key, Firebase config), storage bucket names, hidden or admin routes, source maps.

Step 2. Attack with no account. Using only what you found in step 1, try to:
- read every table straight from the database with the public key
- list and download files from every storage bucket
- call every database function (RPC) and every API route without logging in
- open admin pages and hidden routes directly

Step 3. Attack as a normal user. Sign up as test user A and test user B. As user A, try to read, change and delete user B's data: swap IDs in URLs and requests, call the API with B's IDs, guess storage paths, and send fields the form doesn't show (role, is_admin, plan, user_id, price).

Step 4. Check the live database, not just the code. Migrations can say one thing while the real database says another. If you have database or CLI access, list every table with row level security off, every policy that is just "true", and every function the anon role or PUBLIC can execute (look hard at SECURITY DEFINER). Revoking from anon alone isn't enough if PUBLIC still has it.

Step 5. Report. For every hole you got through: what you did, the exact request or command, what came back (redact real people's data), how bad it is (critical, high, medium, low) and the fix in one line. Worst first. Then list what you tried that held.

Don't fix anything yet. Wait for me to say which ones to fix, then fix them one at a time and show me each diff.
How it attacks

Five steps, the way a stranger would do it

  1. 01
    Recon like a strangerIt reads the JavaScript your site ships and lists the keys, URLs and buckets anyone can see.
  2. 02
    Attack with no accountIt uses your public key to read tables, list storage and call functions while logged out.
  3. 03
    Attack as a normal userIt signs up twice and tries to read and change the other account’s data.
  4. 04
    Check the live databaseIt looks at what your database actually allows, not what your migrations say.
  5. 05
    Report, worst firstEvery hole it got through, the exact request, and a one-line fix. Nothing changes until you say so.
What it found on mine

Stuff I’d missed for months

I ran this on my own apps. The first two never showed up when I just read the code, because they lived in the live database, not the repo.

  1. 01
    Database functions anyone could runTwo of them let anyone with the public key rewrite a published blog post, no login needed.
  2. 02
    A view that skipped the row rulesIt sat over about 125,000 sessions, and the table rules didn’t apply to it.
  3. 03
    A password with a fallback in the codeIf the real one wasn’t set, the hardcoded one worked in production.
Short on time?

Attack just one thing

Just the storage:

Try it: Just the storage
List every storage bucket this app uses and try to list and download files from each one without logging in.

Just the database functions:

Try it: Just the database functions
List every database function the anon role or PUBLIC can execute and try calling each one logged out.

Just one user vs another:

Try it: Just one user vs another
Sign up as two test users and try to read and change user B’s data while logged in as user A.

Only attack apps you own. Point it at your own localhost or staging site, never at someone else’s, and never at production with real users in it. This catches the common holes in apps built fast with AI. It isn’t a penetration test, so if you handle payments, health data or anything regulated, get a real security review too. For the full 20-point checklist, see the security guide.

More field guides

All guides →
Claude Code · GuideHow to make motion graphics with Claude Code →Six looping effects, one prompt eachClaude Code · GuideHow to security-check your vibe-coded app with Claude Code →One prompt, 20 checks, a fix listClaude Code · GuideHow to get the most out of Claude Fable 5.2 →Cost, design, finishing the job, and five skills to installClaude Code · GuideThe UX checklist: make your app easier to use →The UX laws, a checklist per screen and one audit promptJev · GuideHow to set up Jev and make your first API call →Step by step, about 5 minutesJev · GuideHow to automate SEO internal linking with Jev →The script, the prompt and the threshold ruleJev · GuideHow to find sales prospects ready to buy with Jev →Two scripts and the three filtering questionsJev · GuideHow to automate bookkeeping with Jev →Categorize every transaction, flag what needs a humanJev · GuideHow to filter Amazon products fast with Jev →The agent browser, the rules as questions, the raceJev · GuideHow to search Zillow by what the filters can’t see with Jev →699 listings judged in under 18 secondsJev · GuideHow to check legal citations and research state law with Jev →LegalJev (free) and Monid, side by sideJev · GuideHow to build a Clay-style lead list with Jev →Treg on GitHub: judge first, pay secondJev · GuideHow to find buyers on LinkedIn with Jev →290 posts scored in 3.8s, 23 buyersJev · GuideHow to sort your inbox with Jev →500 emails in 7 seconds for a centJev · GuideHow to find viral TikToks with Jev →780 videos, 137 outliers, sorted by nicheHiggsfield · GuideHow to swap the people in any video with Higgsfield Genjutsu →The clip, the photos, the prompt and the costChatGPT · GuideHow to build and submit your own ChatGPT plugin extension →The server, the ZIP and the review checklistJev · Directory200+ Jev demos, repos and docs by team →Everything worth watching or running