Is Your Lovable App Safe? A 20-Minute Security Check

· 8 min read ·
vibe-coding security supabase lovable

A man in a green sweater at a laptop while a small robot detective points at a checklist clipboard, a stopwatch on the desk

In February 2026, researchers at Wiz opened Moltbook, a viral social network its founder said he had vibe-coded without writing a line of code. Browsing like normal users, within minutes they had full read and write access to the entire production database: 1.5 million API tokens, 35,000 email addresses, private messages. The key in the app’s JavaScript was the public publishable key, which is meant to be there; the cause was that row level security was off, so that public key could read and write every table (Wiz’s writeup).

Three months later a security firm, RedAccess, told WIRED it had found more than 5,000 vibe-coded apps with virtually no authentication, close to 2,000 of them appearing to reveal private data. The platforms disputed parts of the claim (WIRED).

Neither story needed any real hacking. The data was left unlocked, and the owners found out from strangers.

Here is a 20-minute first pass you can run on your own app tonight. It needs nothing but a browser and a terminal.

Lovable already scanned it. Why check again?

Lovable runs automatic security checks before every publish (database access rules and row level security, public tool access, vulnerable packages) and deeper advanced checks under More, Security, which add categories like keys and passwords, plus a secrets-in-code scan from Wiz if your workspace has it connected. Its own docs say the checks cannot replace a full review: a scan reads your code from the inside, and the checks below ask your app from the outside, the way the internet does. Passing Lovable’s scan is a good start; this post is the proof.

If your app uses Lovable’s built-in backend, the More menu replaces the Supabase dashboard everywhere in this post: More, Database has the tables and, under Manage, the policies and SQL editor; More, Users has the accounts; More, Storage has the buckets; More, Secrets is where server keys live.

Minutes 0 to 5: can a stranger read your database?

Your shipped JavaScript tells an attacker exactly how to talk to your database. So start there.

Open your live site, open DevTools (right click, Inspect), go to the Network tab, reload, and filter for supabase. Click any request to your project and copy two things: the project URL (it ends in .supabase.co) and the apikey header.

Now ask for one of your tables, logged out, the way a stranger would:

Terminal window
curl "https://YOUR_PROJECT.supabase.co/rest/v1/profiles?select=*&limit=3" \
-H "apikey: YOUR_PUBLISHABLE_KEY"

Read the answer like this:

  • Rows of real data: that table is open to the entire internet. This is how the Moltbook data came out.
  • []: locked down, but only if the table has rows. A table with no rows also returns [], so check the row count in the dashboard first, or add a test row.
  • 42501 permission denied: good. The grant is blocking you.
  • 401 with an invalid key or JWT message: the test did not run. Supabase says publishable keys go on the apikey header, not Authorization: Bearer. Fix the request and repeat.

Legacy keys (starting eyJ) also work this way; new projects use sb_publishable_.

Run it for every table your app touches; your app’s own network requests list them, so check every table in the Table Editor. Not on Supabase? Whatever endpoint your browser calls, call it yourself, logged out, and see what answers. Why your Supabase table is public and how to check goes deeper on this door, with a regression test that keeps it shut.

Minutes 5 to 10: did a secret key ship in your JavaScript?

Some keys are allowed to be public. Some must never leave your server.

Supabase’s publishable key (the older name is anon) is public by design. What it can do is limited by your row level security. The secret key (older name: service_role) bypasses every rule you have. It belongs on your server only.

In DevTools, open the Sources tab, press Cmd+Shift+F (Ctrl+Shift+F on Windows) to search every loaded file, and search for:

  • service_role
  • sb_secret
  • sk_
  • eyJhbGci (every legacy Supabase key starts with this; logged-in users’ session tokens too, so hits are expected and the payload’s role decides)

Nothing found? Move on. New Supabase keys are strings that start sb_publishable_ or sb_secret_, so the prefix tells you which kind you found. A long legacy key starting eyJ is a JWT: decode it locally, without pasting it into a website:

Terminal window
echo "PASTE_KEY" | cut -d. -f2 | tr '_-' '/+' | base64 -d 2>/dev/null; echo

"role":"anon" is fine. "role":"service_role" or an sb_secret_ key in your frontend is an emergency: anyone who opened your site since deploy day has had full access to your database. Do not rotate by clicking around. A leaked service_role key is retired in order: create a new secret key, move every backend use to it, deactivate the legacy keys (this also kills the legacy anon key, so switch your frontend to a publishable key first), then revoke the legacy JWT secret. Supabase’s rotation guide has the steps, and how keys leak and how to rotate without downtime has the rest.

Minutes 10 to 15: can one user reach another user’s data?

Sign up for your own app twice. Call them A and B.

Logged in as A, try to reach B’s data:

  • Change IDs in URLs, anywhere a number or slug identifies a record.
  • Open the Network tab, find the request that loads A’s data, right click it, Copy as fetch, paste it into the console, change A’s ID to B’s, and run it.
  • If anything comes back, try editing and deleting B’s records the same way.

While logged in as A, copy the Authorization: Bearer eyJ... value from any request in the Network tab. Run the step one curl with that header added and ask for B’s rows, to see what a signed-in stranger could get.

A hidden button is not security. The question is whether the database says no, and the only way to know is to ask it.

While you are in the Supabase dashboard, open the Security Advisor. It flags tables with row level security off. An empty list does not mean safe: a policy of true turns RLS on and lets everyone in, which is the common AI-generated “fix”. Open each policy and read the condition.

Minutes 15 to 20: git history, storage buckets, old deploys

  • Git history. If a .env file was ever committed, every key in it is leaked, even if you deleted the file later. git log --all --oneline --name-only -- '*.env*' tells you in seconds and catches .env.local and nested files. The full hunt is in the leaked keys post.
  • Storage buckets. A public Supabase bucket lets anyone download its files without logging in, and file paths are often guessable (user IDs, sequential names). Private documents in a public bucket is the classic mistake. Check each bucket’s public toggle in the dashboard.
  • Old preview deployments. Open an old preview URL in a private window to see whether it is public. On Vercel, turn on Deployment Protection; on Netlify, delete old deploys that shipped a key.

Found something?

Fix in this order:

  1. Rotate the leaked key first. Deleting it from your code does nothing for the copies already out there.
  2. Then fix the rules (row level security, bucket privacy, grants).
  3. Then rerun this whole check. It takes 20 minutes and it now means something.

A prompt to start with

Audit this app like an attacker with no login. List every endpoint and table the client code talks to, every key or token present in client-side code or git history (run git log, do not just read the working tree), and every place access is checked only in the UI. For each finding, say how you would verify it from the outside. Do not fix anything yet.

Verify its claims with the steps above. The AI can point; only the outside test proves.

The one check an engineer does by hand

The curl in step one. Engineers trust it because it needs no cooperation from your code, your framework, or your AI tool. It is what the internet sees.

If this check found nothing, genuinely, well done. The two follow-ups: how to find API keys leaked in less obvious places, and row level security explained, which is the fix for most of what this check finds.

Want to see what a full review of a small app turns up, with the failing tests? Read the before and after teardown.

The Get AI Native ebook goes deeper on this. It is free, and the expected launch is around Christmas. Join the waitlist on the homepage.

Comments