Guides
Practical fixes for common security mistakes in apps built with AI app builders.
Supabase and Row Level Security
Lock down tables and storage, and fix policies that return nothing.
How to check if your Lovable/Supabase app is leaking data
A step-by-step check you can do in 15 minutes: find your Supabase keys, see which tables have Row Level Security off, test what an anonymous visitor can read, and spot leaked secret keys.
How to enable Row Level Security in Supabase (with copy-paste policies)
Turn on RLS and add the right policies for the common cases — owner-only rows, public read, profiles, teams, insert-only forms and storage — plus the gotchas that quietly re-open your data.
Supabase RLS policy examples for profiles, posts, orders, messages and file uploads
Copy-paste Row Level Security policies for the five tables most apps have, with select, insert, update and delete written out, the reasons behind each one, and how to test them.
Supabase RLS not working or returning an empty array: causes and safe fixes
Your query returns [] or an update silently does nothing. The usual causes (no matching policy, no signed-in user, wrong owner column, missing SELECT policy) and fixes that don't open the table to everyone.
Is my Supabase anon key safe to expose? (Yes — here's what actually protects your data)
Yes, the Supabase anon (publishable) key is meant to be public. What protects your data is Row Level Security. Here's how to check and fix it.
Firebase
Security Rules that protect data without reopening the database.
Firebase security rules for vibe-coded apps: lock down Firestore and Storage
Your Firebase API key is public by design; Security Rules protect your data. Copy-paste Firestore and Storage rules for apps built with AI tools.
Firebase test mode expired or permission-denied errors: write real rules instead of reopening the database
When test-mode rules hit their expiry date, every client request is refused. Don't push the date forward: replace the rule with owner-based Firestore, Storage and Realtime Database rules, then test them.
API keys and leaked secrets
Which keys are public, how to keep the rest server-side, and what to do after a leak.
How to find leaked API keys in your vibe-coded app's JavaScript bundle
Anything in your frontend bundle is public. Here's how to search your Lovable, Bolt, v0 or Cursor app's JavaScript for secret keys — and fix a leak.
How to hide API keys in a Bolt or v0 app (and what VITE_ and NEXT_PUBLIC_ really mean)
VITE_ and NEXT_PUBLIC_ variables are copied into the JavaScript every visitor downloads. Keep secret keys in server-side code: a Next.js route handler in v0, a server or edge function in Bolt.
Lovable API key exposed: what to do now
If a secret API key ended up in your Lovable app's code or chat, rotate it at the provider first, then store the new one in Lovable's Secrets and call the API from an edge function.
I leaked my Supabase service_role key: what to do
A leaked service_role or sb_secret key bypasses Row Level Security. Remove it from the frontend, create a new secret key, switch your servers to it, then deactivate or delete the leaked key.
Checklists and tools
Pre-launch checklists and the free scanners worth knowing about.
Vibe coding security checklist (printable, works with any stack)
A one-page security checklist for apps built with AI tools, whatever the stack: data access rules, secrets, auth, payments, files, headers and re-checking after every AI edit.
Lovable security checklist: 12 things to check before you launch
A 12-point security checklist for Lovable apps before launch: scans, RLS, secrets, storage, admin pages, auth, payments and re-checking after AI edits.
Free security scanners for vibe-coded apps compared
What six free scanners for AI-built apps actually check, whether they need your URL, your repo or your Supabase project, and whether they verify you own what you scan. Built from each tool's own site.
Free tools: is this key safe to expose? and the Supabase RLS audit SQL. Or run a free scan of an app you own.