Vibe coding security: check your AI-built app before real users sign up
Apps made with Lovable, Bolt, Replit, Base44, v0 or Cursor can work well and still let one user read another user's data, ship secret keys to every browser or let a payment be skipped.
Here is what goes wrong, a thirty-point check you can run yourself, and what a paid check adds.
In this guide
Thirty-point pre-launch checklist for AI-built apps
Work through this vibe coding security checklist before real users sign up, ticking each item once you have confirmed it. You need a browser, two test accounts and your platform's dashboard.
How to use itHide the instructions
Items that fail come with a brief you can paste into your builder. Run it only on an app you own.
Why a working AI-built app can still leak data
Vibe coding security is about the gap between an app that works and an app that only does what you meant.
An AI builder writes code until the screens behave the way you asked. Nobody has necessarily asked what happens when someone ignores the screens and talks straight to the database behind them, and that is where most of the trouble in AI-built apps sits.
Many of these apps run on Supabase or Firebase, where the browser talks to the database directly. That design is normal and documented: the project address and a public key travel to every visitor, and rules inside the database decide what each request may read or change.
Supabase's own warning for a table with row level security switched off is that anyone with your project URL can read, edit and delete all of its data.
Firebase's is that, without sign-in and security rules, anyone who guesses your project ID can steal, change or delete it. When those rules are missing or loose, nothing in the screens makes up for it.
The builders are clear about who answers for this. Lovable's documentation says you are responsible for making sure your app meets the security requirements of its use case, and Base44's says you are responsible for your app's security settings. Their scans help, and they are covered below, but the decision to let real people in is yours.
None of this makes AI-generated code security a new science. The flaws are familiar ones, led by the risk OWASP lists first for APIs: one user reaching another user's records by changing an ID in a request. What changes with vibe coding is that the person publishing the app has usually not read the code, and a builder can rewrite a database rule in the middle of an unrelated change. Checking before launch, and again after large changes, is how you learn what was actually built.
Five ways vibe-coded apps go wrong, and what each one costs
These are the vibe coding security risks the checklist on this page is built around.
Each one starts with what could happen to your users or your bill, then says what to look at.
What could happen: a visitor, or anyone who signs up, lists your whole customer table, reads other people's messages or bookings, opens uploaded invoices and identity photos, or edits and deletes records that are not theirs. The app's screens give no hint of it, because each person only ever sees their own rows there. Lovable's documentation calls misconfigured row level security rules a common cause of data leaks.
What to look at: two questions for every table or collection. Is there a rule at all, and does it limit each row to its owner? On Supabase, a policy can exist and still let everyone through, for example one whose condition is simply true, or one that only checks that someone is signed in.
On Firebase, the equivalents are rules left as test mode sets them, which lets anyone read and overwrite your data, and rules that only check request.auth != null, which admit any signed-in account, including one created a minute ago.
Uploaded files count too: anyone with the link to a file in a public Supabase storage bucket can open it. Checklist items 1 to 9 walk through each of these.
What could happen: someone copies a key out of your app and uses it to read your entire database, issue refunds, send email in your name or run up your AI bill. Deleting the key from your code later does not stop them. Only rotating it does.
What to look at: some keys are meant to be public. Supabase's publishable key (the older name is the anon key), Firebase's API key and Stripe's publishable key all appear in the browser by design and rely on the rules behind them. Others must stay on a server: Supabase's secret key and its legacy service_role key can bypass row level security, a Stripe secret key has unrestricted permissions across your Stripe account, and Firebase's documentation says a Gemini API key should never be included in code.
Keys for AI models, email and SMS belong with them. These keys usually leak through a setting name.
In a Next.js app, which is what v0 builds by default, any variable starting with NEXT_PUBLIC_ is written into the JavaScript every visitor downloads. In a Vite app the prefix is VITE_, and Vite's documentation says those variables should not hold API keys.
What could happen: strangers create accounts in an app meant only for your staff or invited clients, someone registers with an email address they do not own, accounts fall to passwords leaked from other sites, or an ordinary user opens the admin page because only its menu link was hidden.
What to look at: who may sign up at all, whether email addresses are confirmed before the first sign-in, the minimum password length, how password reset works, and whether every admin page checks the person's role where the data is read, not only in the menu.
Supabase and Base44 show most of these as settings you can read for yourself, and checklist items 16 to 21 say where to find them.
What could happen: people get paid features, credits or orders without paying. The two usual causes are an app that treats reaching the thank-you page as proof of payment, and a plan or credits field that each user is allowed to edit on their own profile.
What to look at: Stripe's documentation says fulfilment cannot rely on the checkout landing page alone, because customers are not guaranteed to reach it, and that webhooks are required. The pattern Stripe documents has Stripe notify your server, the server check the message's signature and confirm the payment status with Stripe, and only then does anything unlock.
If the browser can mark an order as paid, so can anyone else. Plan, role and credit fields should be written only by that server step, not by a user's permission to update their own profile.
What could happen: a script fills your sign-up or contact form thousands of times and each submission sends an email or SMS you pay for, someone uses your AI feature as a free chatbot running on your key, or uploads fill the storage you pay for.
OWASP's API security list describes the pattern: resources paid for per request, such as emails, SMS and phone calls, where abuse turns straight into operating costs.
What to look at: every feature that costs money each time it runs, whether it needs a signed-in account, and how often one person can trigger it. OWASP's guidance is to limit how often a client can call the service, cap the size of what can be sent, and set spending limits with each provider or, where a provider offers none, billing alerts.
The two-account test, and how to run it safely
The most useful check a non-developer can run needs nothing beyond a browser and two email addresses you control.
It asks one question: can an ordinary user see or change something that belongs to another? OWASP calls the failure broken object level authorisation, and ranks it first in its API security list.
Run it only on an app you own, using only test accounts and test data. Testing someone else's app needs the owner's permission first, and that applies to a quick look as much as to a full test. Delete nothing during the test, and if your app has a staging copy, use that instead of the live one.
- Create two test accounts and call them A and B. Use a normal browser window for A and a private window for B, so the two sessions stay separate.
- As A, create one of everything your app stores: a profile, a booking, a message, an uploaded file. Put a made-up word in each, such as an unusual surname, so you can recognise it later.
- As B, look for that word everywhere: lists, search, dashboards and exports. B should find nothing that belongs to A.
- As A, open one of your records and copy the address from the address bar. Paste it into B's window. If the address contains a number, also try the numbers either side of one of B's own records. Each attempt should show an error or B's own data, not A's.
- Copy the link to A's uploaded file and open it in a private window while signed out. If the file opens, anyone with the link can open it.
- Sign out completely and paste the addresses of your dashboard, settings and admin pages. Each should send you to the sign-in page without showing any data first.
- Write down what you did and what you saw. If something fails, that note becomes the start of your fix brief.
Then use the checks your platform already has
The two-account test goes through your app's screens, and screens can hide data the database would still hand over to a direct request. A pass is encouraging, not proof, so read the rules as well. In Supabase, the Security Advisor flags tables without row level security under the title "Table publicly accessible", along with database functions that visitors can run without signing in.
Supabase notes that some findings may be intentional, so read each one against what you meant to be public.
In Firebase, the Rules Playground in the console simulates a read or write as a signed-out visitor or as a specific user ID. Simulating a read of user A's document as user B is the most direct way to ask Firebase whether your rules keep the two apart.
Builder by builder: what the platform checks and what it leaves to you
Each builder now ships some security help.
None of them knows which of your data is meant to be private, so treat each one as a starting point and the checklist on this page as the rest of the job.
Lovable runs a Quick scan every time you publish, covering a database review, a dependency audit and an MCP server check. Its Deep scan reviews your application code but does not run on its own, so start it yourself before launch and after large changes.
Lovable's documentation says its tools do not replace a thorough security review, and that API keys cannot be stored safely in client-side code: they go in Lovable's Secrets, with the calls made from server-side code.
Bolt's Security Audit scans a Bolt Cloud database for problems such as an open permission or a missing row level security policy, and Bolt suggests reopening it after any database change. It checks only the database, not the rest of the project, so keys in the code and the payment flow still need your attention.
If it reports "RLS Policy Always True", Bolt's guidance is that this is acceptable only if you are comfortable with every visitor changing or deleting that data.
Replit keeps credentials in Secrets, and its documentation says API keys, passwords and tokens should not be stored as ordinary configuration. Someone who remixes your project from its cover page sees the names of your secrets but not their values.
Secrets are not available to Static Deployments, so an app published that way has no server-side place to hold a private key, and any key it uses is a key the browser can read.
Base44 sets each app to Public, Private or Workspace. A Public app can be opened by anyone on the internet without signing in, and apps that look like public sites start as Public by default.
Private, for invited people only, needs a Starter plan or higher. Inside the app, data access rules decide who can see or edit each type of data, and Base44's security scan looks for overly open data, credentials stored in the wrong place and login gaps.
Base44 rate-limits public endpoints by default, which blunts bulk abuse but does not decide which of your features should need an account.
v0 builds full-stack apps on Next.js by default, and its documentation notes that a variable must start with NEXT_PUBLIC_ to be readable in browser code. That prefix is the thing to check. The Supabase project address and publishable key can carry it; a secret key, a service_role key or an AI provider key must not.
If your v0 app uses Supabase, its tables need the same row level security checks as any other Supabase app.
Cursor is a code editor, so the app it helps you write lives in your own repository and runs on whichever hosting and database you chose. Every check on this page applies, and the rules sit in your own Supabase or Firebase project. Cursor's agent asks before running terminal commands by default, and Cursor describes its auto-approval run modes as best-effort guardrails rather than a hard security boundary.
The agent reads files without asking, so keep production keys out of the project folder or block them with a .cursorignore file.
Turning a failed check into a fix your builder can apply
Builders respond best to a precise instruction that comes with a way to check the result.
A vague prompt such as "make this app secure" tends to produce a confident reply and a small change. Each brief below, like the Supabase and Firebase briefs in the checklist, says what to change, what must stay true afterwards and what the builder should show you.
Brief for a secret key found in the browser
"A secret API key is visible in the JavaScript this app sends to browsers. Move every call that uses it into server-side code, such as a Supabase Edge Function or a server route, and read the key from the platform's secrets store.
Remove it from every file that builds the screens and from any variable starting with NEXT_PUBLIC_ or VITE_. List the files you changed. I will rotate the key myself afterwards."
Brief for features that cost money
"For sign-up, password reset, contact forms, invitations and every AI feature: require a signed-in account with a confirmed email where the feature allows it, add a limit per account and per IP address with a clear error message when it is reached, and set a daily cap per account on AI usage. List each feature with the limit you applied."
Check the fix before you believe it
When the builder says it is done, run the two-account test again, rerun the platform's scan, and ask the builder to paste the current policies or rules so you can read them line by line against your one-line description of who should see what.
If a key was exposed, rotate it in the provider's dashboard yourself and confirm the old one stops working. The builder cannot recall a copy someone has already taken.
What the vibe-coded app security check covers
The Clever Ops vibe-coded app security check asks the checklist's questions with evidence for every answer, and goes past the screens to the database and functions behind them.
It suits founders and teams who built with an AI builder, usually on Supabase or Firebase, and want to know what a stranger could do before real users or payments arrive.
Testing uses accounts created for the purpose. It writes only to records those accounts created, deletes nothing else, and runs against a staging copy where one exists. If you can share read access to your Supabase project or Firebase console, the check also reads the policies and rules themselves, which is where a rule that exists but admits the wrong people is easiest to catch.
To begin, we need written authorisation for the app, its address, two test accounts for each role (or permission to register them), and a short note of which data is meant to be public. Exported code, through GitHub sync or a download, is optional and lets the key search cover the code's history.
- Data exposure: every table, collection and storage bucket the app uses, tried for reading, creating, changing and deleting as a signed-out visitor and as two test accounts, with the expected and actual result recorded for each.
- Functions that can be called directly, such as database functions and edge or server functions, and whether each one checks who is calling.
- Keys: the JavaScript your app sends to browsers and, if you share it, your exported code and its history, searched for secret and service keys.
- Sign-up and login: who can register, email confirmation, password rules, password reset, and every page or action that should need a particular role.
- Payments: whether a payment can be skipped or faked, and whether plan, role and credit fields can be changed by the user they belong to.
- Bulk abuse: features that send email or SMS, call an AI model or accept uploads, checked for sign-in requirements and repeat limits.
- Your app's own AI features, where it has them: whether a user can talk the feature into revealing another user's data or into running up usage.
Where the check stops
Knowing the edges helps you decide whether this is the right check or a starting point for a bigger one.
- It does not rebuild your app or change its code. Fixes come back as briefs for you or your builder to apply. If you would rather hand them over, a security fix sprint runs under its own statement of work.
- It covers your project, not the builder's or the database provider's own platform.
- Logic-heavy apps, such as marketplaces, lending tools or products that bill several customer organisations, need a web application and API penetration test scoped individually, or a referral to a larger firm.
- There is no load, denial-of-service or volumetric testing. Bulk abuse is assessed by looking for missing limits, not by flooding your app.
- It is not a certificate. The report records what was tested, on which build and on which dates. If a customer or tender requires a CREST-accredited tester, Clever Ops is not CREST accredited, so we refer that work to a provider that is.
What you get back
The report is written for the person who built the app, not for a security team.
Every finding opens with what a stranger could do and whose data or money it affects, in plain English, before any technical detail.
- An access table for your data: each table or collection down the side, a signed-out visitor, user A and user B across the top, and in each cell what should happen beside what did happen.
- For each finding: what was tried, the evidence with secrets and personal data redacted, the business impact and a severity rating.
- A fix brief for each finding, written to paste back into your builder, with the check that will show whether the fix worked.
- A list of every key found in the browser or in your code, saying which to rotate and where.
- Checks that found nothing, recorded as results for the accounts and build tested, so you can see what was covered.
- Each finding's OWASP Top 10:2025 category, so a developer you bring in later can place it quickly.
- One retest of the reported findings after your fixes, requested within the window set in your statement of work, with each finding then marked fixed, partially fixed, still reproducible or not retested.
Keeping the app in shape after launch
An AI-built app changes every time you prompt it, and a change to one screen can quietly rewrite a rule elsewhere.
A few habits keep this vibe coded app security work from going stale.
- Rerun the two-account test after any change that touches data, sign-in or payments, and reopen your platform's security page after every database change, as Bolt advises.
- If your Supabase project was created before 30 May 2026, know what that year's change to table access does and does not do. Supabase announced that from 30 October 2026, new tables in existing projects are no longer reachable through its Data API until access is granted, while tables that already existed keep the access they had. Row level security still decides which rows each user sees.
- Keep production keys away from your coding agent. Give it test credentials, and read the commands it wants to run before approving anything that touches real data.
- Set spending limits or billing alerts with every paid provider before you announce the app, not after the first surprise invoice.
- If you find real data exposed, close the gap first, rotate any exposed keys and work out whose information was reachable. An organisation covered by the Privacy Act 1988 must notify affected people and the OAIC when a data breach is likely to result in serious harm to them, so get advice early if personal information may have been accessed.
- When the app outgrows the builder, with its own server code, several customer organisations or complex billing, a web application and API penetration test or a secure code review becomes the better fit.
Frequently asked questions
Vibe coding is a way of building, and the risk sits less in the tool than in publishing without checking. The builder writes code that makes the screens work, and nobody may have asked it what happens when someone skips the screens and talks to the database directly. Lovable's documentation says you are responsible for making sure your app meets the security requirements of its use case, and Base44's says you are responsible for your app's security settings. The practical answer is to run the checklist on this page before real users or payments arrive, and to get a second look when the app holds personal, health or financial information.
Not on its own. Supabase designs the publishable key, and the older anon key, to be visible in the browser, and it reaches only what row level security allows. The risk is a table without row level security, or with a policy that lets everyone through. The secret key and the legacy service_role key are different: they bypass every policy and must not appear in browser code.
It covers part of it, and it is worth running before every publish. Lovable's Quick scan reviews the database each time you publish, Bolt's Security Audit looks for missing or open database policies, and Base44's scan looks for open data, misplaced credentials and login gaps. A scan cannot know which of your data is meant to be private, whether your payment flow can be skipped, or whether a reasonable-looking rule still lets user B read user A's records. The two-account test, and a check by someone who tries those things deliberately, answer that.
No. Run them only on apps you own, with test accounts you created. Testing a system you do not own needs the owner's permission first, and that applies to a quick look as much as to a full test. If you are worried about an app you use, contact its owner or the platform it is built on.
The vibe-coded app security check has a fixed shape. It concentrates on the five areas on this page (database rules, keys, sign-in, payments and bulk abuse) in builder-made apps on Supabase or Firebase, and its report is written for a non-developer. A web application and API penetration test is scoped around a custom application's routes, roles and business rules, and suits apps with their own server code, several customer organisations or complex billing.
Clever Ops quotes each check after a scoping call rather than publishing prices, because the effort follows what the app holds: how many tables or collections, user roles, payment flows and paid features it has. Bring your answers to this checklist to the call, and it can start from what you have already found.
Scope the right test for your application
Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.