Back to Free Tools

Check If Your Supabase App Is Leaking User Data

Built with Lovable, Bolt, Cursor, or Claude Code? Paste your SQL setup or copy our safe 1-line Supabase check. We translate privacy holes into plain English—with the exact AI prompt or SQL to fix them.

100% Local — Zero Data Leaves Your Browser Zero Customer Rows Read Copy-Paste AI & SQL Fixes
No Code Files? Use This 2-Click Check

Pull Your Live Supabase Locks Safely in 15 Seconds

  1. Click Copy Safe Check below (it only reads table & lock names, never your users’ data).
  2. Open Supabase Dashboard → SQL Editor, paste, and hit Run.
  3. Copy the result cell (audit_json) and paste it into the box below.
-- Safe read-only check: reads ONLY table/policy structure, ZERO customer data
SELECT json_build_object(
  'tables', COALESCE((
    SELECT json_agg(json_build_object('name', tablename, 'rlsEnabled', rowsecurity))
    FROM pg_tables WHERE schemaname = 'public'
  ), '[]'::json),
  'policies', COALESCE((
    SELECT json_agg(json_build_object(
      'name', policyname, 'table', tablename, 'cmd', cmd,
      'roles', roles, 'usingExpr', COALESCE(qual, ''), 'withCheckExpr', COALESCE(with_check, '')
    ))
    FROM pg_policies WHERE schemaname = 'public'
  ), '[]'::json),
  'functions', COALESCE((
    SELECT json_agg(json_build_object(
      'name', p.proname,
      'securityDefiner', p.prosecdef,
      'hasSearchPath', (p.proconfig::text ILIKE '%search_path%'),
      'hasAuthFilter', (p.prosrc ILIKE '%auth.uid()%')
    ))
    FROM pg_proc p
    JOIN pg_namespace n ON n.oid = p.pronamespace
    WHERE n.nspname = 'public'
  ), '[]'::json)
) AS audit_json;
Try an example:
Scanned: 2 tables · 1 rules · 1 helper functions ● Runs 100% locally in your browser

What We Found (4)

Red Alert — Data Leakpublic.users · RLS_DISABLED

Anyone on the internet can read or edit your "users" table

Row-Level Security is turned off on "users". Using your public website key, any stranger can download or alter every row from a browser console.

“Turn on Row-Level Security for my Supabase table "users" (both ENABLE and FORCE ROW LEVEL SECURITY), and create policies so signed-in users can only read, create, and update rows matching their own (select auth.uid()) = user_id.”

Red Alert — Data Leakpublic.documents (Enable read access for all users) · OPEN_USING_TRUE

Rule "Enable read access for all users" lets any stranger access every row in "documents"

The policy uses USING (true), which opens the door to every customer's records in "documents". Even logged-in users can pull another customer's data in DevTools.

“Remove the unsafe USING (true) policy "Enable read access for all users" on "documents". Replace it with a strict owner or organization membership check using (select auth.uid()) = user_id restricted TO authenticated.”

Red Alert — Data Leakpublic.match_documents() · SECURITY_DEFINER_RPC

Database function "match_documents()" runs with Superuser rights and skips table locks

SECURITY DEFINER tells Postgres to run "match_documents()" as an admin, ignoring all table RLS rules. For AI search functions like match_documents, User A can pull User B's private files.

“Fix Supabase function "match_documents()" by removing SECURITY DEFINER (use SECURITY INVOKER so table RLS applies automatically), or lock down search_path and filter explicitly using (select auth.uid()).”

Quick Improvementpublic.documents · NO_FORCE_RLS

Optional hardening: force database owners to obey "documents" locks too

Right now "documents" enforces locks for browser users, but direct server connections acting as the table owner still bypass them unless forced.

“Add "ALTER TABLE public.documents FORCE ROW LEVEL SECURITY;" to my database migration so even table-owner connections respect row policies unless explicitly elevated.”

Database Safety ScoreData Leak Risk
13/ 100
3Red Leaks
0Warnings
1Speed Tips

Found 3 Critical Privacy Holes

Strangers or logged-in users could view, download, or overwrite data they should not touch. Fix the red items below before accepting live signups or payments.

Common Questions (No Jargon)

Why does Lovable or Cursor warn me about "RLS" in the first place?+

Row-Level Security (RLS) is the lock on each table in Supabase. Without it, anyone who visits your website gets your public site key and can read or erase every user’s rows straight from their browser.

Can ChatGPT or Claude just write my RLS policies instead?+

AI can write policies fast, yet it also creates mistakes like USING (true) shortcuts or SECURITY DEFINER database functions that silently bypass your locks. This scanner verifies the actual rules you already have so nothing slips through.

Does your 1-line helper query read my customers or emails?+

No. It only inspects PostgreSQL’s built-in structure catalogs (table names, whether locks are turned on, and policy rules) — zero user rows or private data are touched.

Is anything I paste saved on Tessellate Labs servers?+

Never. All scanning runs 100% inside your browser JavaScript with zero API requests.