Security guides for AI-built apps
New: the free Supabase RLS policy checker reads your policies and grants (in your browser) and flags write holes an outside scan can't test.
Also see breach breakdowns: real leaks in AI-built apps and how to check yours.
Practical checks and fixes for apps built with Lovable, Bolt, v0, Cursor and Supabase, written by Pritesh Ghodge, a security engineer.
- Supabase WITH CHECK (true): what that INSERT policy actually opens
USING vs WITH CHECK, when with check (true) is fine vs dangerous on user-owned rows, SQL to list every open write policy, the owner-scoped fix, Advisor lint 0024 gaps, and how the free policy checker flags it. - Free tool: Supabase RLS policy checker
Run one read-only SQL query, paste the result, and see every open INSERT, UPDATE, SELECT or DELETE policy and risky grant, with fix SQL. Runs in your browser; nothing is uploaded. - Supabase "new row violates row-level security policy": fix it without opening your table
USING vs WITH CHECK, the five usual causes (no INSERT policy, user_id null or not auth.uid(), .select()/upsert needing SELECT and UPDATE, owner changes on update, storage uploads), a SQL test as the real user, and why with check (true) is the wrong fix. - Is your Supabase anon key safe to expose? Yes, until your RLS says otherwise
Why the anon/publishable key is meant to be public, how to tell it from a service_role key in your live app, and four checks on what a stranger can read, write and call with it. - v0 app security checklist (from a security engineer)
NEXT_PUBLIC_ secrets, Supabase RLS, Server Actions and Route Handlers as public endpoints, exposed .env/.git/source maps, Vercel security headers and the two-account test. - Cursor-built app security checklist (from a security engineer)
NEXT_PUBLIC_/VITE_ secrets, Supabase RLS and using(true)/WITH CHECK(true), service_role, Storage buckets, exposed .env/.git/source maps, security headers, Server Actions as public endpoints, the two-account test and re-scan after deploy. - Is my Bolt.new app secure? A security checklist before you publish
Bolt's two built-in security checks, the 'RLS Policy Always True' warning, signed-in vs own-row policies, VITE_ variables vs Secrets, server functions, storage, exposed files, headers and the two-account test. - Lovable app security checklist (from a security engineer)
Nine checks before you share a Lovable app: built-in scans, RLS, views and grants, buckets, keys, edge functions, exposed files, headers and the two-account test. - How to check if your Supabase tables are readable by anyone
A 60-second curl test, the using (true) trap, and the SQL to fix it. - Supabase "Security Definer View" warning: why your view bypasses RLS and how to fix it
Find views and materialized views that ignore your RLS, test what a stranger gets with your public key, and fix them with security_invoker, revokes or a separate table. Plus the same trap in security definer functions. - Is your Supabase storage bucket public? How to check it and lock it down
Find public buckets and storage policies that let strangers list or upload files, when public is fine, and how to move to private buckets, per-user folders and signed URLs. - OpenAI, Claude or Gemini API key exposed in your frontend? What to do now
How to check your live JavaScript for an AI key, the order to fix it in (new key, server route with auth and rate limits, revoke, spend cap), and a prompt for your AI builder. - Supabase "42501 permission denied for table": fix it with a GRANT, not by turning off RLS
What Supabase's 30 October 2026 grants change means, the safe per-role fix, the two fixes that open your data, and a prompt for your AI builder. - Supabase service_role key exposed? Do this in the next 15 minutes
Replace the key without breaking your app, check for misuse, and move privileged code to the server. - 3 files your production site shouldn't be serving: .env, .git and source maps
How each one ends up deployed, a curl test for each, how to block them, and what to rotate if one was public. - Security headers for Lovable, Bolt, v0 and Cursor apps: CSP, HSTS and clickjacking
Check what your live site sends with one curl command, which headers matter, and how to add them on Vercel, Netlify, Next.js or Lovable hosting. - NEXT_PUBLIC_ and VITE_ variables are shipped to every visitor
Which keys are safe in the browser, how to search your live bundle for leaks, and how to fix one.
Want this checked for you? Abbi Labs scans your live app for these issues; the first scan is free.