Ship-Safe 01 · 0:49
4 leaks to check before you ship an AI-built app
Four common leaks in apps built with AI tools (Supabase, Next.js, Vite, Stripe) and a prompt that makes Claude Code audit your project for them.
The 4 leaks
- 1Keys named NEXT_PUBLIC_ or VITE_ are baked into the JavaScript every visitor downloads. Never put a secret there.
- 2A Supabase secret (service_role) key in frontend code bypasses every Row Level Security policy. Keep it server-side only.
- 3Tables with RLS off can be read and written through your public key. Turn RLS on for every table in an exposed schema and add policies.
- 4A Stripe webhook that doesn't verify the Stripe-Signature header accepts fake events, like a payment that never happened.
The twist
- Your publishable key is meant to be public. The policies behind it are the lock.
Paste this into Claude Code before you ship
Audit this project for 4 leaks and show me each finding with the file and line before changing anything: (1) any secret in a NEXT_PUBLIC_ or VITE_ variable or otherwise bundled into client code; (2) a Supabase secret or service_role key used outside server code; (3) Supabase tables without Row Level Security enabled, or with policies that let anyone read or write; (4) Stripe webhook handlers that don't verify the Stripe-Signature header with the endpoint secret. Then propose a fix for each one and wait for my OK.
Sources
Not a full security review. Check your own stack's docs.
Want this done for your business?
We build websites and AI tools for small businesses anywhere in the US.
Get a free demo