Terms & acceptable use
🛡️ Free scan

Paste your live app link. We check it for leaked keys and open data. Free.

FreeJust your email to see results10 seconds

The free scan shows your problems. The $9 fix report gives you a copy‑paste fix prompt for each one.

Guide · Lovable + Supabase · Updated

Is My Lovable App Safe? How to Check Your Live Supabase App for Open Tables and Leaked Keys

You can check most of this yourself in a few minutes, for free. This guide shows you how. Check your live app, the one real people use, not just your code.

1. The short answer

Your Supabase anon key is meant to be public. Every Supabase app that runs in a browser ships it. Hiding it is not what keeps you safe.

The real risks are tables with Row Level Security (RLS) turned off, policies that let anyone read everything (like using (true)), and secret keys that ended up in your frontend code.

2. Why vibe-coded apps hit this

Lovable, Bolt, Cursor and other AI builders can make a new table in seconds. The app works right away. But a working app is not the same as a locked app.

RLS and policies are easy to skip. Sometimes the AI adds a rule that is too open, just to make an error go away. Secret keys can also slip into frontend code when you ask the AI to "just make it work". Nobody notices until a stranger does.

3. The 5-minute manual check on your live app

Only check apps you own or have permission to test.

Step 1: Find your public Supabase key

Open your live app. Open your browser dev tools (right-click, then Inspect) and go to the Network tab. Reload the page. Look for requests to supabase.co. The apikey header is your public key. It starts with eyJ (anon key) or sb_publishable_ (newer publishable key).

Finding it is normal. That is not the problem. The next steps are.

Step 2: Try to read each table while logged out

Get your table names from the Table Editor in your Supabase dashboard. Then run this in a terminal for each table. Swap in your project URL, table name and public key:

curl "https://YOUR-PROJECT.supabase.co/rest/v1/TABLE_NAME?select=*&limit=1" \
  -H "apikey: YOUR_PUBLIC_KEY"
  • You see a row of real data: anyone can read this table. Fix it first.
  • You see []: no rows came back. RLS is probably blocking logged-out users, or the table is empty. Check which one in the dashboard.
  • You see error 42501 or "permission denied": the public role can't reach this table. That is usually good for private tables.

Also open Advisors → Security Advisor in your Supabase dashboard. It is free, and it flags tables with RLS turned off.

Step 3: Search your JavaScript for secret keys

In dev tools, open the search across all files (Ctrl+Shift+F on Windows, Cmd+Option+F on Mac). Search for each of these:

  • sk- and sk_live (OpenAI and Stripe secret keys)
  • service_role and sb_secret_ (Supabase keys that skip RLS)
  • secret and AKIA (other secrets and AWS keys)

A Stripe key that starts with pk_ is meant to be public. A Supabase service_role key looks like the anon key (it also starts with eyJ). If you find more than one long eyJ key, compare them with the keys in your Supabase dashboard under Project Settings → API Keys. If one is the service_role key, it must come out of your frontend. See Supabase anon key vs service_role key for how to tell them apart and rotate a leaked key.

Step 4: Visit /.env and /.git/config

Open a private window. Go to yourapp.com/.env and then yourapp.com/.git/config. You should get a "not found" page, or just your normal app page. If you see lines like OPENAI_API_KEY=... or [core], those files are public. Delete them from the live site and rotate every key in them.

4. What "RLS on" still misses

Turning RLS on is step one. It is not the whole job. Watch for these:

  • Policies that allow everyone. A select policy with using (true) means RLS is on, but anyone can still read every row.
  • "Any logged-in user" policies. A policy for authenticated with using (true) lets any signed-in user read every row. Anyone can sign up, so that is not much of a lock. Match rows to auth.uid() instead.
  • Open insert and update rules. Check that users can't change other people's rows, or give themselves an admin role.
  • The service_role or secret key in client code. These keys skip RLS completely. If one is in your frontend, your policies don't matter.
  • NEXT_PUBLIC_ and VITE_ variables. Anything with these names gets built into the code every visitor downloads. Never put a secret in one.

5. Supabase's Oct 30, 2026 change: what error 42501 means

Supabase is changing how new tables work. On October 30, 2026, Supabase applies a new default to all existing projects. New tables you create in the public schema will not be reachable through the Data API until you add an explicit GRANT. The Data API is what supabase-js uses, so this covers most Lovable and Bolt apps. New projects have had this default since a rollout that started May 30, 2026.

Tables you already have keep their current grants. They keep working. Apps that only use a direct Postgres connection are not affected.

If a grant is missing, you get this error:

{
  "code": "42501",
  "message": "permission denied for table your_table",
  "hint": "Grant the required privileges to the current role with: GRANT SELECT ON public.your_table TO anon;"
}

Why you should not just turn off RLS

Grants and RLS are two different locks. The grant decides if a role can reach the table at all. RLS decides which rows it can see. Turning off RLS does not add a missing grant. And once the table is granted, RLS off means anyone with your public key can read and change every row.

Error 42501 can also come from RLS itself, when a policy blocks an insert or update. Again, the fix is a better policy, not turning RLS off.

What to do instead

Supabase says to treat these three steps as one unit:

-- 1. Grant only what each role needs
grant select, insert, update, delete on public.your_table to authenticated;

-- 2. Keep RLS on
alter table public.your_table enable row level security;

-- 3. Add a policy
create policy "users can read their own rows"
  on public.your_table for select to authenticated
  using (auth.uid() = user_id);

Only grant to anon if logged-out visitors really need that table.

More detail, including fixes that make things worse and how to see what each table is granted: Supabase "permission denied for table" (42501) after the Oct 30 change.

Sources: Supabase changelog: tables not exposed to Data API automatically · Supabase docs: Database API 42501 errors · Supabase docs: Securing your API

6. Stop surprise bills

A leaked key can be used by anyone, and you get the bill. Set limits now, before anything goes wrong:

  • OpenAI: in your OpenAI platform settings, set a monthly budget and email alerts. Use a separate key for each app, so you can turn one off without breaking the rest.
  • Google Cloud (Gemini, Maps): create a budget with alerts in Billing. A budget alert warns you. It does not stop spending by itself. Also add API and website restrictions to each key.
  • Vercel: on paid plans, use Spend Management. Set an amount, get alerts, and choose whether to pause your projects when you reach it.
  • Any key that was ever public: rotate it. Old copies can live on in old builds and in your git history.

7. Copy-paste fix prompts for Lovable, Bolt and Cursor

Paste one into your AI builder. Swap in your table name where you see TABLE_NAME. After each fix, run the manual check again.

Lovable: lock every table
Go through every table in my Supabase database. Turn on Row Level Security for each one. Add policies so each user can only read and change their own rows, using auth.uid(). Remove any policy that lets everyone read everything, like using (true), unless that table is meant to be public, such as a list of blog posts. Tell me which tables are public on purpose. Then test that the app still works when I am logged in and logged out.
Lovable or Bolt: move secret keys out of the frontend
Find every secret key used in my frontend code: OpenAI, Stripe secret keys, the Supabase service_role or secret key, and any other private API key. Move each one to a server-side function, like a Supabase Edge Function, and call that function instead. Make sure no secret is in a variable that starts with VITE_ or NEXT_PUBLIC_. Then list every key you moved so I can rotate it.
Bolt: fix an open table
My Supabase table "TABLE_NAME" can be read by anyone. Turn on Row Level Security for it. Add a policy so users only see their own rows. Do not use using (true). Keep the app working, and show me the SQL you ran.
Cursor: review RLS policies
List every table in the public schema of my Supabase project. For each one, show whether RLS is on and every policy on it. Flag any policy that uses true, or that lets any logged-in user read all rows. Suggest a policy based on auth.uid() for each one, and write it as one migration file. Do not turn off RLS anywhere.
Any builder: error 42501 permission denied
I get Supabase error 42501 "permission denied for table TABLE_NAME". Do not turn off Row Level Security. Add only the GRANT this table needs for the role that is failing (anon or authenticated). Keep RLS on, and add a policy so users only reach their own rows. Put the grant, the RLS setting and the policy in the same migration.

8. Automate it

Don't want to do this by hand after every change? VibeCheck checks your live app from the outside, the way a stranger would. It looks for leaked keys in your public JavaScript, open Supabase tables, security headers, Google basics like your title and sitemap, and broken links.

It only looks. It never logs in, fills in forms or tries to break in. If it finds an open table, it notes the table name and never stores the rows.

Pricing: the problems list is free (just add your email). A fix report with a copy-paste prompt for every problem is $9. Or get 10 fix reports for $29. No subscription.

No tool can promise your app is safe. VibeCheck catches common, costly mistakes so you can fix them first.

9. FAQ

Is the Supabase anon key secret?

No. The anon key (or the newer publishable key that starts with sb_publishable_) is meant to be public. It ships in every Supabase app that runs in a browser. What keeps your data safe is Row Level Security (RLS) and good policies on every table. The service_role key and the secret key (sb_secret_) are different. They skip RLS, so they must never be in your frontend.

Can someone read my Lovable database?

Only if a table lets them. If a table has RLS turned off, or a policy like using (true), anyone with your public key can read it. To find out, open your live app in a private window and try to read each table while logged out. The steps are in this guide.

How do I know if my API key leaked?

Open your live app, open your browser dev tools, and search all loaded files for key patterns like sk-, sk_live, service_role, sb_secret_ and AKIA. If a secret key shows up, it is public. Also check your provider dashboard for usage you do not recognize. If a key was ever public, rotate it. Deleting it from your code is not enough.

Will turning off RLS fix error 42501?

Do not do that. Error 42501 means permission denied. It can come from a missing GRANT on the table, or from an RLS policy that blocks an insert or update. Turning off RLS lets anyone with your public key reach every row once the table is granted. Instead, add only the grant the table needs, keep RLS on, and add a policy so each user only reaches their own rows.

What changes in Supabase on October 30, 2026?

Supabase says that on October 30, 2026 it applies a new default to all existing projects: new tables you create in the public schema are not reachable through the Data API until you add an explicit GRANT. Tables you already have keep their current grants. New projects have used this default since the rollout that started May 30, 2026.

Do I need a tool to check my app?

No. You can do every check in this guide by hand for free. A tool like VibeCheck just runs the checks on your live app for you and gives you a fix prompt for each problem.

More questions? See the VibeCheck FAQ. Want to go deeper on table rules? Read the Supabase RLS check guide and Supabase anon vs service_role key. Before you launch, run the vibe coding security checklist (12 checks for any AI-built app). Google still shows "Lovable App" as your title? See how to fix your title, description and share preview. Scan says "No Content-Security-Policy"? See how to add security headers.