Disclosure first: I'm Jacob, the founder of Vibe App Scanner. The numbers here come from scans run by my own product. Read them as a vendor's data, with the limits I list below.
Between December 17, 2025 and August 4, 2026, Vibe App Scanner ran 1,215 security scans of vibe-coded apps, meaning apps built with AI coding tools. 5.4% of those scans recorded an exposed secret, and 5.0% recorded a Supabase database function that anyone could call.
The apps were submitted by their owners, most scans used a quick set of checks, and these are scanner findings, not confirmed breaches. The full report, with method and limits, is here.
Most people who find a key in their bundle have one question, so I will answer that first and get to the data after.
Is the Supabase key in your bundle meant to be public?
Open your deployed app, open DevTools, and search the loaded files for your Supabase URL. The key will be near it. Then:
- It starts with
sb_publishable_. It is meant to be in the browser. It is only as safe as your row level security: the key lets anyone send requests, and your policies decide what comes back. - It starts with
sb_secret_. It should never be in the browser. Supabase's docs say a secret key gives full access to your project's data, bypassing Row Level Security. The docs also say Supabase refuses a secret key that is sent from a browser. That does not make a leaked one harmless, because anyone can copy it out of your bundle and use it from a script. - It is a long string starting with
eyJ. That is a legacy key, and there are two kinds that look alike. The middle section, between the two dots, is base64 text, not encryption. Paste this into your browser console with your key in place of the placeholder:
JSON.parse(atob("YOUR_KEY".split(".")[1].replace(/-/g, "+").replace(/_/g, "/"))).role If it prints anon, that is the public key. If it prints service_role, that is the secret one and it should not be there. Decoding a token this way is ordinary JWT handling, not something specific to Supabase.
- Check where it came from. Anything in a variable starting
VITE_orNEXT_PUBLIC_is shipped to every visitor. A secret in one of those is public, whatever the variable is called.
The first three points follow Supabase's API keys documentation. Supabase's docs say it is deprecating the legacy anon and service_role keys in early 2027, so if you are still on them it is worth planning the move.
What a scan from the outside can and cannot tell you
These were scans of a live URL. A scan like that can see a string in your JavaScript that matches the pattern of a secret, and it can see a function that returned something to a call carrying only the public key.
It cannot see whether a key is still active or what it can reach. It cannot tell whether a function that answered also returned anything sensitive. So read everything below as "this was observed", not "this is the whole picture".
The three findings
| Finding, as named in the report | Share of the 1,215 scans |
|---|---|
| Exposed secret | 5.4% |
| Unprotected Supabase RPC | 5.0% |
| Unprotected edge function | 1.0% |
1. An exposed secret (5.4%)
The report defines this as "an API key or credential shipped in client code or a response".
Illustration, not taken from a scanned app: an AI tool wires a call to a payment or AI provider straight into a React component, and the provider's secret key ends up in a VITE_ variable. The app works, so nobody looks.
The fix has an order. Rotate the key first, because you have to assume it was copied. Then move the call into server code or an edge function and keep the new key in a server-side secret. Moving the code without rotating leaves the old key working for whoever already has it.
2. A database function anyone can call (5.0%)
The report describes this as "a database function callable by anyone, no auth required". Functions in your public schema can be called through the API at /rest/v1/rpc/your_function.
Two defaults make this easy to get wrong. Supabase's docs say that by default any role can run a database function, including the signed-out one. And a function written as security definer runs with its owner's rights, so row level security does not apply inside it.
Illustration: a function named something like get_all_orders, written as security definer, returns every customer's orders to a call that carries only the public key.
Taking the right to run it away from signed-out callers is the first half:
revoke execute on function public.get_all_orders() from public, anon; grant execute on function public.get_all_orders() to authenticated; It is only half. I tested this: after those two lines, a signed-out call is refused, but any signed-in user still gets every row, because the function still skips RLS. The function needs its own check on who is asking:
create or replace function public.get_my_orders() returns setof public.orders language sql security definer set search_path = '' as $$ select * from public.orders where user_id = (select auth.uid()); $$; revoke execute on function public.get_my_orders() from public, anon; grant execute on function public.get_my_orders() to authenticated; If you want new functions to start out closed, Supabase's docs give this, which I also tested:
alter default privileges for role postgres revoke execute on functions from public; After it, a new function can be run only by its owner until you grant it to someone.
3. An edge function anyone can call (1.0%)
The report describes this as "a serverless function callable without authentication".
Illustration: an edge function that sends an email or calls a paid API, and runs for any caller.
Supabase checks for a valid token before your function runs unless you turn that off (verify_jwt = false in the function's config). The catch is in Supabase's own docs: that platform check accepts the public key, and passing it does not authenticate the caller. Everyone has your public key. So a function that relies on the platform check alone is open to everyone.
The fix is to check the caller inside the function: confirm there is a signed-in user, and confirm that user is allowed to do the thing the function does. Supabase's Edge Functions auth page shows the current way to do that.
How to check your own app by hand
Use your own app and test data only.
Search your bundle. In DevTools, open Sources and search across all files for sb_secret_, for service_role, and for the prefixes of any paid API you use. Then search for eyJ and decode what you find with the line above.
Call your functions as a stranger. For each function your app calls at /rest/v1/rpc/, repeat the call with only the public key and no user token:
curl -X POST "https://YOUR-PROJECT-REF.supabase.co/rest/v1/rpc/YOUR_FUNCTION" \ -H "apikey: YOUR_PUBLISHABLE_KEY" \ -H "Content-Type: application/json" \ -d '{}' If you get permission denied for function, signed-out callers are shut out. If you get data, decide whether a stranger should have it.
Then sign in as a second test user and call it again with that user's token. If you can see the first user's data, the function is missing its owner check.
Call your edge functions two ways. Once with no headers at all, and once with only the public key:
curl -i -X POST "https://YOUR-PROJECT-REF.supabase.co/functions/v1/YOUR_FUNCTION" \ -H "Content-Type: application/json" -d '{}' curl -i -X POST "https://YOUR-PROJECT-REF.supabase.co/functions/v1/YOUR_FUNCTION" \ -H "apikey: YOUR_PUBLISHABLE_KEY" \ -H "Content-Type: application/json" -d '{}' If either one does the function's work, it is public.
What the built-in checks cover
Supabase Security Advisor reads your database configuration. It has checks for security definer functions that the signed-out role, or any signed-in user, can run. It does not read your JavaScript bundle, so it will not tell you a secret has been shipped to the browser.
Lovable's security checks review the app's code for problems with keys, sign-in and permissions. Lovable's docs say the checks "can't guarantee that your app is secure or replace a full security review".
GitHub secret scanning looks at what is committed to a repository. That is not always what is deployed: a key can reach the bundle from a hosting dashboard's environment settings without ever being committed.
Where an outside check adds something. It looks at the bundle that was actually shipped and at what the live endpoints actually return. That is a different question from how things are configured, and you want both answered.
Limits of this data
- The apps were submitted by their owners. The results cannot tell you how common these problems are across all AI-built apps.
- 1,007 of the 1,215 scans used a quick check set. Missed issues, false positives and repeat scans of the same domain can all move the figures.
- These are scanner classifications. They are not confirmed breaches. The report does not say how many of the exposed secrets were still active.
- The figures are frozen as published in August 2026 and have not been recomputed since.
Disclosure, again
I built Vibe App Scanner, which is how I collected this. If you run the checks above and are not sure how to read what comes back, ask in the comments and I will help.