Guide · Lovable
Lovable security check: is your app safe to launch?
Lovable builds a working app in an afternoon. Whether strangers can read your users' data depends on a few settings it does not always get right. Here is what to check, how to check it, and what to tell Lovable to fix it.
Free instant check, no sign-up. It only reads what your app already shows to any visitor.
How a Lovable app is put together
The part people see is a React app that runs in the browser. Everything it needs to run, including the address of your Supabase project and its public key, is shipped to every visitor. Anyone can open the page code and read it. That is normal and not a problem by itself.
The data lives in Supabase. The public key lets the browser talk to your database directly, so the only thing standing between a stranger and your tables is Row Level Security (RLS): the rules that say which rows each user may read and change. If a table has no RLS, or a rule that lets everyone through, anyone with the public key can download it. And everyone has the public key.
The five holes we see most often
1. Tables without Row Level Security
A table created with RLS off answers every request made with the public key. Profiles, orders, messages: whatever is in it can be read, and often changed, by anyone. This is the most serious and the most common problem in apps built on Supabase.
2. Rules that let everyone in
RLS is on, but the policy says using (true). That reads as "anyone may read every row". It is often added to make an error go away during building and never removed.
3. The service role key in the page code
Supabase has two keys. The public (anon) key is meant for the browser. The service_role key skips every rule and must only live on the server. If it ends up in the page code, your whole database is open no matter how good your rules are.
4. AI and payment keys in the browser
Calling OpenAI, Anthropic or Stripe straight from the page means the secret key is in the page code. Anyone can copy it and run up your bill. These calls belong in a Supabase Edge Function, with the key stored as a secret.
5. Edge Functions that never ask who is calling
An Edge Function is a public address. If it does not check the logged-in user, anyone can call it: send emails from your account, spend your AI credits, or read data meant for one user.
Check it yourself in ten minutes
- Look for secret keys. Open your live app, press F12, open the Sources tab and search all files (Ctrl+Shift+F, or Cmd+Option+F on a Mac) for
service_role,sk-,sk_liveandsecret. A match that is a real key is a problem. - Open the Supabase Security Advisor. In your Supabase dashboard, go to Advisors → Security Advisor. It lists tables with RLS turned off.
- Read every policy. In Authentication → Policies, look for
truein a policy's condition, and for tables that hold personal data but have no policies. - Try it as a stranger. Log out, open the app in a private window, and try to open pages that should need a login, including pages with another user's ID in the address.
- List your Edge Functions. For each one, ask Lovable: "Does this function check which user is calling it?"
Prompts to paste into Lovable
Lovable fixes these well once you name the problem precisely. Paste one at a time and check the result.
Turn on Row Level Security for every table in the public schema. For each table, add policies so a signed-in user can read and change only their own rows (where user_id = auth.uid()). Remove any policy whose condition is just "true". Show me the SQL before you run it.
Search the whole project for API keys used in the browser (OpenAI, Anthropic, Stripe secret keys, the Supabase service_role key). Move every call that uses them into a Supabase Edge Function, store the keys as Edge Function secrets, and make the page call the function instead.
In every Supabase Edge Function, check the caller's login token at the start and reject the request if there is no signed-in user. Where the function reads or changes a record, check that it belongs to that user.
After a key has been in the page code, deleting it is not enough: it may already be copied. Create a new key in the provider's dashboard and revoke the old one.
What the ShipProof check covers
The free check opens your live app the way a stranger would. It finds secret keys in the page code, including the Supabase service_role key, downloadable source code, unsafe login cookies and missing browser protections, and it notes which database your app uses.
The full check runs after you prove the app is yours by adding one tag to your home page. Then it tries to read each Supabase table your app uses with the public key, exactly as a stranger would, and reports which ones answer. It also tests your API addresses and looks for exposed .env and .git files. All requests are read-only, and reports keep field names, never your data.
Each problem comes with a prompt like the ones above, written for your app. No check can prove an app is secure; this one finds the common mistakes that are easiest to exploit.
Check your Lovable app now
A grade and the problems in plain language in a few seconds.