LeakLatch

For Supabase, Lovable, Bolt and Cursor apps

Are my Supabase tables public?

Direct answer

They are, if any table in an exposed schema has Row Level Security off, or has a policy that lets the anon role read every row. Your anon key ships in your frontend by design, so anyone who opens your site can use it to query those tables. Turn RLS on for every table and give each one a policy that only returns the rows a user should see.

LeakLatch is a free, read-only scan of a live URL you own. It reports Supabase tables that answer with your public anon key, leaked secret keys in your JS bundles, and missing security headers. You get a risk score, redacted findings, and a fix prompt for Lovable, Cursor, or Claude.

Owner checks

How to check your own project

Use these on a project you own or have permission to test. They only read settings; nothing here writes to your data.

  1. Step 1

    List tables with RLS off

    Run the query below in the SQL editor. Any row where rowsecurity is false is a table in the public schema without Row Level Security. Tables in an exposed schema are reachable through the Supabase API, so anyone with the anon key from your page can try to read them.

  2. Step 2

    Read every policy, not just the switch

    RLS on with no policies blocks the anon role entirely. RLS on with a policy like USING (true) for anon or public lets anyone read every row. Look for SELECT policies that do not compare a column to auth.uid(), and for policies granted to the public or anon role on tables that hold user data.

  3. Step 3

    Open the Security Advisor

    In the Supabase dashboard, go to Advisors, then Security Advisor. It flags tables in the public schema with RLS disabled and other risky settings. Fix every error, then re-run it.

  4. Step 4

    Check views and functions too

    A view runs with its owner's rights by default, so it can return rows that RLS would hide. On Postgres 15 and later, create views WITH (security_invoker = true), or move them out of the exposed schema. Review SECURITY DEFINER functions the same way.

  5. Step 5

    Test from the outside on your live site

    Your app's preview and production builds can differ. After each deploy, check the live URL as a logged-out visitor would see it, using the same anon key that ships in your JavaScript.

-- Run in the Supabase SQL editor of your own project.
-- Lists every table in the public schema and whether RLS is on.
select schemaname, tablename, rowsecurity
from pg_tables
where schemaname = 'public'
order by rowsecurity, tablename;

-- Lists every policy, so you can spot ones like USING (true).
select tablename, policyname, roles, cmd, qual
from pg_policies
where schemaname = 'public'
order by tablename;

Copy-paste fix

Prompt you can paste into Lovable or Cursor

Paste this into Lovable, Cursor, or Claude and point it at your own project. Review each policy it writes before you apply it.

You are helping me lock down my own Supabase project. Keep existing product behavior working for signed-in users.

1. List every table in exposed schemas (usually public). Enable Row Level Security on each one with ALTER TABLE ... ENABLE ROW LEVEL SECURITY.
2. For each table, write the narrowest policies the app needs. Users may read and change only their own rows (for example user_id = auth.uid()). Logged-out visitors must not be able to list other people's rows. Remove any USING (true) policy on tables with private data.
3. Recreate views in exposed schemas WITH (security_invoker = true), and review SECURITY DEFINER functions.
4. Make sure no service_role or sb_secret_ key is in client code or client-exposed env vars. Rotate any that already shipped.
5. Add RLS and policies to every future migration you write.

FAQ

Straight answers about RLS and open tables

Is it a problem that my Supabase anon key is visible in the browser?

No. The anon or publishable key is designed to be public. It is safe only when Row Level Security is enabled on every exposed table and the policies are correct. The service_role or sb_secret_ key is different: it bypasses RLS and must never be in client code.

Does a table created in the SQL editor have RLS on?

Not unless you turn it on. Tables made with plain CREATE TABLE in SQL start with RLS off, so add ALTER TABLE ... ENABLE ROW LEVEL SECURITY and the policies you need. Many AI-generated migrations skip this step, so check after every schema change.

I enabled RLS and now my app shows no data. What happened?

With RLS on and no matching policy, Postgres returns zero rows. Add a SELECT policy that matches your intent, for example letting a signed-in user read rows where user_id = auth.uid(). Do not fix it by adding USING (true) on tables that hold private data.

What does LeakLatch check here?

When a public Supabase URL and anon key are already on the page, LeakLatch makes read-only GET requests to list which tables answer and how many rows they return. Row contents are discarded and never stored or shown. It never writes to your database and never logs in. You must confirm you own the site or have permission to scan it.

Is this a substitute for a full security audit?

No. LeakLatch is a pre-ship check for leaked secrets, open Supabase tables, and basic headers. It does not replace a penetration test, a careful review of every RLS policy, or Supabase's own Security Advisor.

Want this check done for you, read-only?

Paste a URL you own. LeakLatch returns a score, redacted findings, and a fix prompt.

Scan my site free