Is your vibe-coded app leaking your users' data? A 10-minute check, no jargon
In November 2026, the German security firm Crissy Field, working with the newspaper Handelsblatt, looked at 159,041 apps built with Lovable, one of the most popular vibe-coding tools. 34,545 of them used a Supabase datab
In November 2026, the German security firm Crissy Field, working with the newspaper Handelsblatt, looked at 159,041 apps built with Lovable, one of the most popular vibe-coding tools. 34,545 of them used a Supabase database, and 24,664 of those sent database records to anyone who opened them, with no login.
That alone can be fine: a menu or a list of events is meant to be public. But when the researchers asked those databases for a little more, read-only and with the same key each app hands every visitor, they found records with email addresses in 7,403 of the sites. Among them: more than 80,000 forum profiles, more than 200,000 chat messages, and more than 1,000 records with passport numbers.
The researchers are careful to say their 30% figure isn't a confirmed leak rate: some of those addresses were public contact details or test data. And nobody hacked Lovable. Nobody broke in. The apps simply let anyone read what they shouldn't, because their access rules were missing or too loose. As the study says, mistakes like this happen in apps people write by hand too. AI just makes it easy to build an app before you know the question exists.
This guide asks that question, and gives you a 10-minute way to answer it. It's written for Supabase, the database behind a lot of vibe-coded apps, but the first and last steps work for any app.
The one idea you need: a front door and a master key
A Supabase app has two kinds of keys. Supabase's own docs put it best: the publishable key is taped to the front door, and it only opens the lobby. The secret key is the master key, and it stays in your pocket.
-
The publishable key (it starts with
sb_publishable_; older apps have a long one called theanonkey) sits in your app's code, where anyone can read it. That's by design, and it's fine. - What protects your data is the rules on each table. Supabase calls them Row Level Security, or RLS: for each table, who may read or change which rows. "Signed-in users can read their own orders." "Anyone can read the menu."
- A table with no rules is wide open. In Supabase's own words: "Until you enable row level security and write a policy, anyone holding your project's publishable key can read and write every row in it." Read and write: a stranger could change or delete it too.
-
The secret key (it starts with
sb_secret_; older apps have one calledservice_role) skips every rule. It must never be in your app's code.
Here's the catch for vibe coders. Supabase turns the rules on for you when you make a table by clicking in its dashboard. When a table is made with code (SQL), "enable it yourself", the same page says. AI agents often make tables with code, so the rules may never have been turned on.
The 10-minute check
1. Visit your app as a stranger (2 minutes)
Open a private window (Incognito in Chrome), go to your app, and don't log in.
What can you see? A list of users, orders, messages, bookings, anything that belongs to someone? Then sign up as a second, test user and check you can't see the first user's things.
If the page looks clean, good, but don't stop here. A page shows only what it asks the database for, and the database may answer much more to anyone who asks it directly. That's exactly what the study did. The next step checks the database itself.
2. Ask Supabase's own checker (3 minutes)
In your project's dashboard, open the Security Advisor (Supabase groups it with its other Advisors). It runs a list of checks on your database. Look for these three:
- RLS disabled in public: a table with no rules, open to anyone with the publishable key. Fix these first.
- Policy exists RLS disabled: rules were written, but they're switched off.
- RLS enabled no policy: the table is locked and nobody can read it through the app. Often that's on purpose; if part of your app shows nothing, this may be why.
Supabase notes that some findings may be intentional, so read each one before changing anything.
A table can also have rules that still let everyone in. A read rule whose condition is just true means "anyone". That's right for a menu and wrong for orders. Step 6 has an agent check each rule for you.
3. Look for the master key in your app (2 minutes)
Ask your agent:
Search this whole project for any Supabase secret key or service_role key, and any other password or private key. Tell me every place you find one, and whether that code runs in the browser. Don't change anything.
Supabase's newer secret keys refuse to work in a browser, but that doesn't make one safe there: anyone who opens your page can still read the key and use it from other tools, as Supabase warns, and the older service_role key has no browser block at all. One more giveaway: settings whose names start with NEXT_PUBLIC_ or VITE_ are built into the page, where anyone can read them, so a secret must never have one of those names.
If a secret key turns up in the wrong place, making a new one isn't enough: the leaked key keeps working until you switch it off. Follow Supabase's own Rotate a leaked API key: make a new secret key, have your agent move it out of the browser code, then retire the leaked one so it stops opening anything.
4. Remember that "anyone with the link" isn't private (1 minute)
A page, a preview or a file that opens without logging in opens for anyone who has its address, and addresses get forwarded, pasted into chats and found. Supabase's file storage has public and private buckets: a file in a public one opens for anyone with its link. Keep anything personal behind a login.
5. Don't fall for the "permission denied" fix (since 30 October)
On 30 October 2026, Supabase changed every project: a new table can't be reached by your app until access is granted on purpose. Until then, the app gets an error: 42501, "permission denied for table". Bolt made the same change for its own database on the same day. It's a good change: new tables now start closed.
The trap is how your agent might "fix" that error. The quickest ways to make it disappear are to give everyone access with no rules, or to switch the app to the secret key. Both make the error go away, and both open the table to the world. Ask for the safe fix instead:
Fix the "permission denied" error the safe way. Grant only the access the app needs, turn on Row Level Security for that table in the same change, and add rules so each user can only read and change their own rows. Don't use the secret key in the app, and don't give access to visitors who aren't logged in unless I ask for it. Then explain each rule in simple words.
6. Get a second opinion from a second agent (2 minutes to start)
The agent that built your app made these choices, so ask a different one, in a fresh conversation, to check them. Paste this:
You're reviewing this app's security before real people use it. Don't change anything: only read and report.
1. List every database table, whether Row Level Security is on, and in plain words what a visitor who isn't logged in can read or change in it.
2. Check each rule: does any one let everyone in where it shouldn't?
3. Find any secret key, service_role key or password in code that runs in the browser, or in settings whose names start with NEXT_PUBLIC_ or VITE_.
4. List the pages, links and file buckets that work without logging in.
5. Check that one logged-in user can't read or change another user's data.
For each table, say whether you read its rules in this project's files or in the live database. If you can't see the live database, say so, and don't guess.
Rank what you find from worst to least bad, and explain each one in simple words.
Tables made by clicking in Supabase's dashboard, or with SQL pasted into it, aren't in your project's files, so an agent that reads only the files can't see them. If it says it can't see the live database, ask it for one read-only query that lists every table and its rules, run that in Supabase's SQL Editor, and paste the result back.
When to call a professional
If your app holds health information, ID documents, payment details or anything about children, or real customers are about to use it, have a security professional review it first. The study's authors say the same: "Automated checks are no substitute for a professional security assessment."
Builders are adding checks of their own, too. Lovable now asks you to review critical security findings before you publish, and a workspace can block publishing until they're fixed. Use those, and still run the check above: it takes ten minutes.
A second pair of eyes on the same board
Disclosure: I build Moontors, a free app for macOS, Windows and Linux that runs Claude Code, Codex, Gemini CLI, Grok Build and OpenCode side by side on one board. It's free, with no Moontors account.
Step 6 is where it helps:
- In the project where you built your app, click Create session and pick a different agent from the one that built it, Codex if Claude Code built it, for example.
- Choose Plan as its mode, so it explores and edits nothing. Give it the title
Security review, and paste the review prompt. - When it's done, go to the session that built the app and ask: "Read what the session titled Security review found, and fix each issue one at a time, explaining each fix." In Moontors, a session can read another session's work by its title, whatever its agent.
The review and the fixes sit side by side on the board, and you can follow both from the phone app.
Your users trusted your app with their data. Ten minutes is a small price to keep that trust.
AI did the writing, I did the reading, and we both took credit.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.