// guides
Security guides for AI-built apps
Short, sourced fixes for the problems we see most in apps built with Lovable, Bolt, Cursor, Replit and Claude Code. Each one has a quick test you can run yourself and a prompt you can paste into your AI tool.
New free tool · Dec 4, 2026 · Supabase · RLS
Supabase RLS policy checker: paste one query result, see which tables leak
One read-only SQL query in the Supabase SQL editor, then paste the result. Flags tables with RLS off that anon can reach, using (true) and login-only policies on private tables, auth.uid() is null branches, self-comparisons, user_metadata checks and views that skip RLS, with fix SQL for each. Runs in your browser.
Open the checker
Dec 3, 2026 · Supabase · Drizzle · Prisma · RLS
Using Drizzle or Prisma with Supabase? Your RLS policies don't protect those queries
DATABASE_URL logs in as postgres (table owner, BYPASSRLS) or a bypassrls prisma user, so auth.uid() policies never run for ORM queries and each WHERE clause is the only guard. Check your connection role, filter every query by the verified user or run queries in an RLS transaction, and test as two users.
Read the guide
Dec 2, 2026 · Supabase · RLS · Data leaks
RLS is on and your Supabase data still leaks: 5 policy mistakes to check
One always-true policy opens the whole table, because permissive policies are OR'd: using (true), login-only checks, an "or auth.uid() is null" branch, user_id = user_id, and subqueries like m.org_id = org_id where the bare column points at the wrong table. A pg_policies query that finds them, the fixed policies and a two-user test.
Read the guide
Dec 1, 2026 · Supabase · API keys · RLS
Is it safe to commit or push your Supabase anon key? (and the key you must never push)
The anon key and the newer sb_publishable_ key are public by design; RLS and table grants are the lock. The service_role JWT and sb_secret_ keys bypass RLS and must never be in the browser or git. How to tell them apart, a signed-out curl test per table, and how to rotate a leaked secret key.
Read the guide
Nov 30, 2026 · Auth · Supabase · Passwords
Does your vibe-coded app store passwords in plain text? Check your homemade login
AI builders sometimes skip real auth: a users table with a password column and a login query like .eq("password", password). From browser code that means anyone with your anon key can download every password. A 2-minute grep + anon-key test, the fix (Supabase Auth or Argon2id/bcrypt on the server), and how to move existing users safely.
Read the guide
Nov 27, 2026 · Supabase · RLS · Functions
Your Supabase function skips RLS and anyone can call it: lock down SECURITY DEFINER rpc
A SECURITY DEFINER function in public runs as postgres and ignores RLS, and by default PUBLIC, anon and authenticated can all execute it at /rest/v1/rpc. A 1-minute SQL check, a safe anon-key test, and the three fixes: security invoker, revoke execute from public and anon, or a private schema for RLS helpers.
Read the guide
Nov 26, 2026 · Supabase · RLS · Debugging
Supabase form says "Saved" but nothing saved? Fix the silent RLS update
When RLS filters a row out of an UPDATE, Postgres changes zero rows and returns no error, and supabase-js .update() returns no rows by default, so the app shows Saved. The usual cause is an UPDATE policy with no SELECT policy. The one-line client fix, a 2-minute diagnosis, the policy pair to add, and a re-test as the user.
Read the guide
Nov 25, 2026 · Cursor · VS Code · Supply chain
Opening a repo can run code: check .vscode/tasks.json for folderOpen tasks first
A tasks.json task with runOn "folderOpen" runs a shell command the moment the folder opens in VS Code or Cursor, and Cursor ships with Workspace Trust off. A 1-minute grep before you open a repo, the red-flag commands, 3 editor settings, and what to rotate if a planted task already ran.
Read the guide
Nov 24, 2026 · Lovable · Supabase · Privacy
Lovable drafts can touch your live app: a safety checklist before you test or accept
Secrets and connected services use live values in every draft, a draft on your own Supabase project shares your live database, and Accept changes live tables, RLS rules and functions with no backup. Check the banner, test payments elsewhere, keep real customers out of db/seed.sql, export before accepting.
Read the guide
Nov 23, 2026 · AI costs · Supabase · Rate limits
Can a bot drain your OpenAI credits? Lock down the AI endpoint in your vibe-coded app
A server-side key isn't enough if the AI route has no real user check and no per-user limit. Supabase anonymous users pass a getUser() check, and a bot can mint one per request. A 2-minute test, a Postgres or Upstash per-user limiter, and the provider spend caps to set.
Read the guide
Nov 19, 2026 · Supabase · RLS · Roles
Can your users make themselves admin? Lock the role column in your Supabase profiles table
RLS controls rows, not columns. A role, is_admin, plan or credits column next to an "update own profile" policy lets any user promote themselves with one supabase-js call. A 2-minute test as a normal user, and three fixes: a roles table, column privileges or a trigger.
Read the guide
Nov 17, 2026 · API keys · Vite · Next.js
Is your OpenAI or Stripe secret key in your frontend? Find it in 60 seconds and fix it
Anything prefixed VITE_, NEXT_PUBLIC_, REACT_APP_ or EXPO_PUBLIC_ ships to every visitor. A 60-second check of your live bundle, which keys are fine to be public, how to move the call to a server route or Supabase Edge Function, and how to rotate what leaked.
Read the guide
Nov 16, 2026 · Supabase · RLS · Views
Your Supabase RLS is on, but a view leaks every row: fix it with security_invoker
Postgres views run with their owner's privileges by default, so a public view over an RLS-protected table can return every user's rows to anyone with your anon key. Find them in 2 minutes, test logged out, and fix with security_invoker without breaking your app.
Read the guide
Nov 13, 2026 · Stripe · Webhooks · Payments
Can anyone fake a Stripe payment in your AI-built app? Test your webhook in 1 minute
Your webhook URL is public. If the handler skips Stripe-Signature verification on the raw body, one forged checkout.session.completed unlocks your paid plan. A 1-minute curl test, the 5 mistakes AI tools make, and fixes for Next.js, Supabase Edge Functions and Express.
Read the guide
Nov 12, 2026 · Supabase · Realtime · RLS
Supabase Realtime leaks: public channels and RLS-off tables anyone with your anon key can watch
A table in the supabase_realtime publication with RLS off streams every change to anyone with your anon key, and Broadcast/Presence channels without private: true are public. A 2-minute SQL and code check, and the fix with realtime.messages policies.
Read the guide
Nov 10, 2026 · Claude Code · Secrets · Git
Did Claude Code commit your secrets? Check .claude/settings.local.json in 2 minutes
"Yes, and don't ask again" can save the approved command, password or API key included. Apiiro found 1,122 public GitHub copies holding secrets. Check the file and its git history, rotate first, then untrack and gitignore it.
Read the guide
Nov 5, 2026 · Supabase · Stripe · RLS
Hiding Pro features in the UI isn't a paywall: enforce paid plans in Supabase RLS
If the Supabase query still returns Pro rows, free users can read them in DevTools. A 2-minute test, and how to enforce the plan in RLS or a server route with the plan stored where users can't edit it.
Read the guide
Nov 3, 2026 · Lovable · Supabase · RLS
Is your Lovable app one of the 7,403? Check that your Supabase data isn't readable without a login
A Nov 2, 2026 study found records with emails readable without login on 7,403 Lovable sites. Not a hack: RLS off or too loose. A 5-minute check and a fix that won't break your app.
Read the guide
Oct 22, 2026 · Supabase · Auth · RLS
Don't store roles in Supabase user_metadata: any logged-in user can make themselves admin
user_metadata is editable by the signed-in user with one updateUser() call. If RLS policies, signup triggers or API routes read role, is_admin or plan from it, users can promote themselves. How to check, and the safe fix.
Read the guide
Oct 20, 2026 · Supabase · RLS · Migrations
Supabase's October 30, 2026 change: fix "42501 permission denied" without turning off RLS
From Oct 30, 2026, new tables in the public schema need an explicit GRANT before supabase-js can reach them. The safe migration: GRANT, enable RLS and owner-scoped policies together, never disable RLS.
Read the guide
Not sure which of these applies to you?
Paste a public GitHub repo and the free check flags exposed keys, open database rules and missing auth checks in about a minute.
Scan my repo free