Vibe coding security: 10 checks before your app goes live
- Published
- 30 November 2026
Before a vibe-coded app goes live, test four things its preview never tested: who can read which records, where the keys live, who can call the paid AI and email functions, and whether anyone can sign up. Run the 10 checks below before real customers log in. After launch, daily database backups cost about $25 a month on Supabase Pro.
The 10 checks, and what each one catches
| Check | What goes wrong | Passes when |
|---|---|---|
| 1. Someone else's records | A customer changes an id in the address bar and sees another customer's bookings | Nothing is shown |
| 2. Signed-out visitor | The database answers anyone who has the publishable key | An empty list for every table |
| 3. Keys in the browser | A secret key ships in the JavaScript every visitor downloads | A search of the published app's files finds no key |
| 4. Keys in Git | A key was committed once and still sits in the history | Secret scanning finds nothing, or the key was replaced |
| 5. Sign-up | Anyone can make an account and land inside | Sign-up is off, or new accounts need a confirmed email and see only their own records |
| 6. Paid functions | A script calls your AI or email function thousands of times overnight | A per-user limit, and a monthly spend limit on the AI account |
| 7. Payments | A fake "payment succeeded" event marks an order as paid | The webhook rejects events without a valid Stripe signature |
| 8. Packages | The AI added a package with a known hole, or one that doesn't exist | npm audit is clean and every package is a real, used one |
| 9. Files | Photos and documents sit in a public folder | Links expire, and an old link fails in a private window |
| 10. Recovery | A bad change wipes a week of data | A backup has been restored once, on purpose |
Access control is number one in the OWASP Top 10:2025, the list of web app weaknesses security teams work from, which is why checks 1 and 2 come first. The steps below run each check on one example app, with the prompts to hand the reading to Claude or to your builder's chat.
If you can't read code, checks 1, 2, 5, 7 and 9 need only a browser, your builder's chat and its settings screens. Hand checks 3, 4 and 8 to someone who can read the code.
The example: Copperleaf Cleaning's booking app
Copperleaf Cleaning has 16 cleaners, 3 people in the office and about 350 regular customers. Its owner, Dana, built a booking app in Lovable over three weekends, on a Supabase database:
- Customers book a clean, pay a deposit with Stripe, and see their visits and invoices.
- Cleaners see the day's jobs with the address, the notes and the door code.
- The office sees and changes everything.
- A quote function sends three photos of a home to the Claude API and shows an estimate.
The preview never tested who could see the 350 customers' addresses and door codes.
Step 1: write down what the app holds and who touches it
Ask your builder's chat (Lovable, Bolt, Replit, Base44) or Claude Code in the project folder to read the app and interview you. Tell it not to change anything.
Read this project and don't change anything. List every table or collection, every file storage folder, every server function or API route, every outside service the app calls (payments, email, AI, maps) and every place a key or secret is used. Then ask me one question at a time until you can fill a data map: one row per table, folder or function, with what it holds, which kinds of users exist (for example signed out, customer, staff, admin), and what each kind may read, add or change there. Suggest the most likely answer from the names in the code each time, so I can confirm or correct it. Finish with the map, then a list of every place where the code today allows more than the map says, and every function that costs money per call.
Copperleaf's map came back with 7 tables, one photo folder, 4 functions and 3 outside services. The list at the end flagged that every cleaner could read every job, door codes included, and that the quote function accepted calls from signed-out visitors.
Steps 2 to 7 test against this map, so keep it.
Step 2: try to read someone else's data
Make one test user per kind of user and give each a few records. Copperleaf used two customers, two cleaners and one office login. Then run checks 1 and 2 from the table:
- Someone else's records. Sign in as customer A, open one of their bookings, and change the id in the address bar to one of customer B's. Do the same for every page that shows a record. Passes when nothing is shown.
- Signed-out visitor. Most builders talk to the database straight from the browser with a publishable key, which is public by design. Anyone who opens the published app has it, so ask what it reaches with no login. On Supabase, the command below does it per table; on other backends, ask the chat for the equivalent request. Passes when every table returns an empty list. Supabase's Security Advisor flags the worst case: for a table with "RLS disabled in public", "anyone with your project URL can read, edit, and delete all data".
curl 'https://<project-ref>.supabase.co/rest/v1/<table>?select=*' \
-H 'apikey: <publishable key>'If either check fails, fix it in the database's access rules; hiding a button doesn't stop a direct request. Ask for the rules from your data map:
Here is my data map: [paste it]. Rewrite the database access rules so each kind of user can do exactly what the map says and nothing more. Rules must check who is signed in on the server or in the database, never only in the screens. Nobody may change their own role. Show me each rule with one sentence on what it allows before you apply anything, then give me a list of tests: for each kind of user, one action that should work and one that should fail.
Re-run those tests as each test user after every release. Supabase calls these access rules row-level security (RLS) policies; our Lovable + Supabase production guide shows what correct ones look like and how to test each role in the SQL editor.
Copperleaf's fix had two parts: a cleaner reads a job only while it's assigned to them, and door codes moved to their own table that only the assigned cleaner and the office can read.
Step 3: find the keys before someone else does
The database's secret key ignores every access rule, and a Stripe secret key can refund and pay out.
In the browser (check 3). Open the published app in Chrome, then DevTools → Sources → search all files (Ctrl+Shift+F, Cmd+Option+F on a Mac) for the first 10 characters of each secret key you have. Passes when there's no match. Lovable's secrets docs say VITE_ variables are "embedded into the client bundle at build time", and in Next.js anything named NEXT_PUBLIC_ is exposed to the browser, so a secret must never have one of those names. Secret keys belong in server functions only. Bolt, Lovable, Replit and Base44 each have a secrets screen for them.
In Git (check 4). On a public GitHub repository, secret scanning runs for free. On a private one it needs GitHub Secret Protection on a Team or Enterprise Cloud plan. Either way, ask Claude Code to look through what's already there:
Search this repository's files and its whole git history for anything that looks like an API key, secret, token, password or private key, including .env files that were committed and later deleted. Don't print any value in full: show the file, the commit, the first 6 characters and which service it belongs to. Don't change or delete anything. Finish with a list of every key I need to replace, and where in that service's dashboard I replace it.
A key you delete from the code stays in the Git history and in every copy, so replace it: create a new key in that service's dashboard, put it where the old one was (the builder's secrets screen or the hosting environment variables), then delete the old key there.
Type new keys into the secrets screen yourself, never into a chat message, and give each one the smallest permission the service offers. Stripe's restricted keys "can do only what you give it permission to do".
Step 4: close the doors nobody uses
Sign-up (check 5). If your staff invite every user, turn public sign-up off. On Supabase that's "Allow new users to sign up" in the Authentication settings; with it off, only existing users can sign in. If customers sign themselves up, keep email confirmation on, so an account needs a real inbox; it's on by default on hosted Supabase projects. When we audited our own shared Supabase backend in October 2026, sign-up was open with email confirmation off, and three accounts from security testers were sitting in it. Sign-up is now off and those accounts are gone.
Test users. Delete the test users from step 2 before launch, or give them nothing to read.
Files (check 9). Keep storage folders private and show files through links that expire. Copy one photo link, wait past its expiry, and open it in a private window. Passes when it's refused.
Recovery (check 10). Restore yesterday's backup into a spare project once before launch, so you know it works.
Step 5: cap what a stranger can spend
Copperleaf's quote function sends about 6,000 tokens in and gets about 400 back on Claude Sonnet (example numbers). At Anthropic's prices of $2 per million tokens in and $10 per million out, each quote costs about 1.6 cents. 300 real quotes a month cost about $4.80. 10,000 scripted calls overnight cost about $160, and an email or SMS function can be abused the same way.
Check 6 has two parts:
- A limit per user in your app. Only signed-in customers can ask for a quote, and at most 5 an hour each. Ask for it in plain words: "Only signed-in users may call the quote function. Count calls per user and refuse more than 5 an hour with a friendly message."
- A spend limit on the provider account. In the Claude Console, Spend limits → Adjust limit or Set limit sets the organisation's monthly spend limit, and you can set separate limits per workspace. Each API tier also has a cap of its own; when you reach it, Anthropic says usage "pauses until 00:00 UTC on the first day of the next month". On OpenAI, a project budget with Enforce a hard limit on makes requests fail at the limit; its spend alerts only notify you. Copperleaf gave the app its own workspace and set it to $50 a month.
Then test it: sign in as a test user and ask for a sixth quote within the hour. Passes when it's refused.
An AI pipeline that checks credits before it spends
AI runs on · Vercel serverless + Inngest, Anthropic Claude agents, fal.ai video and image models
Tala turns one ad concept into hundreds of video and image variants; Mark built it as its co-founder and CPO. Each run calls paid generation models. The pipeline checks credits before a run spends anything, and a re-run skips the steps that already finished, so a retry doesn't pay twice for them. Details on the case page.
Video providers fail mid-run and clips take minutes to render, so a long run has to survive a failed step without starting over.
Step 6: make payments prove they're real
Stripe tells your app a payment went through by sending a webhook, a request to an address in your app. Anyone can send a request to that address. Stripe's webhook docs say that without a signature check, "an attacker could send fake webhook events to your endpoint to trigger actions like fulfilling orders, granting account access, or modifying records". You verify each event with the Stripe-Signature header and the endpoint's secret.
Find the function that receives Stripe webhooks. Check that it verifies every event with the Stripe-Signature header and the endpoint's signing secret before it reads the event, rejects events that fail, and only then marks anything as paid. Check that the signing secret and the Stripe secret key are stored as server secrets, not in the code. Tell me what you found before you change anything.
Check 7 passes when a request you send to the webhook address without a valid signature is rejected and nothing in the app changes. Stripe's dashboard can also send test events to the endpoint, so you can confirm a correctly signed event still gets through.
Step 7: check the packages, then ask for a second review
Packages (check 8). A study of 16 code models found that on average at least 5.2% of the packages commercial models suggested were made up, and an attacker can publish a real package under a made-up name. npm audit sends your dependency list to the registry and reports known vulnerabilities. Ask Claude Code or the builder's chat to run it, and to list every package with a link to its npm page, so you can see each one is real and widely used.
A second review. Each builder has a check of its own, and Claude Code has a command:
| Tool | What it checks | Limit |
|---|---|---|
| Lovable | Automatic checks before you publish (missing access rules, packages with known problems); advanced checks read all the code when you start them | Findings don't block publishing by default |
| Bolt | A database check on all plans; a security audit of the whole project on paid plans | Run the audit from the Publish menu; Bolt says that button doesn't use tokens |
| Replit | A scan before publishing; Agent security scans of the whole codebase on paid plans | Replit: "A scan is not a complete security review" |
| Base44 | A security scan on all plans, free included | Static code analysis needs the Builder plan or higher |
| Claude Code | /security-review reviews the changes on your branch for injection, auth issues and data exposure | It reads the changes only, so run the step 7 prompt for the whole project |
These checks find missing access rules, keys in code and packages with known holes. Lovable's own docs say they "can't guarantee that your app is secure", and none of them knows that a cleaner shouldn't see a door code. Give the review your data map:
Here is my data map: [paste it]. Review this project for security problems, in this order: access rules that allow more than the map, server functions that don't check who is calling, secrets in code or in public variables, paid calls without a per-user limit, webhooks without signature checks, file storage that is public, and packages with known vulnerabilities. For each finding give the file, what an attacker could do, and the fix. Don't change anything until I confirm.
After launch: what someone checks, and what it costs
| Job | Tool | Cost or time a month |
|---|---|---|
| Daily backups, kept 7 days | Supabase Pro | $25 |
| An email when the app throws errors | Sentry Developer: 1 user, 5k errors a month | $0 |
| An alert when the app goes down | UptimeRobot Free: 50 monitors, checked every 5 minutes | $0 |
| A limit on AI spend | The provider's spend limit from step 5 | $0 |
| Re-run checks 1 to 3 | After every change to access rules or keys, and once a month | About 30 minutes |
Copperleaf's office manager owns the list. Each month she also deletes the logins of cleaners who left, and once a quarter she restores one backup into a spare project, so check 10 stays true.
Where a scanner or a security firm is the better pick
- Several apps, or more than one person changing code each day. A monthly re-run of checks 1 to 3 misses changes in between; a scanner checks each push. Aikido's free plan covers 2 users and 10 repositories.
- Health or legal records, card numbers stored in your own database, or a customer who asks for a security report. Pay a security firm for a penetration test and its written report.
- Nobody on the team can read the code at all. The prompts above produce findings, and someone has to judge them; pay a developer for a one-off review.
When not to launch a vibe-coded app yet
- Check 1 or 2 fails and you don't know why. Launching anyway puts every customer's data one changed id away from anyone else.
- Money moves through it and nobody has looked at the webhook. A fake event can mark orders as paid.
- It keeps something you'd have to report if it leaked: door codes, health notes, ID documents. Get a second person to run steps 1 to 3 with you.
- Nobody will own it after launch. Name the person who runs the monthly checks before it goes live.
If the app has outgrown the builder, Lovable vs Claude Code walks one app through both, and the same 10 checks apply to code you write with Claude Code.
Questions people ask
- What are the risks of vibe coding?
For a business app, the usual ones are access rules that let one user read another's records, secret keys in the browser or in Git, paid AI and email functions anyone can call, and open sign-up. In a 2025 benchmark of coding agents on real tasks, 57% of the solutions from SWE-Agent running Claude 4 Sonnet worked, and 11.8% of all its solutions were secure.
- Is vibe coding safe?
Not with real data until it passes the checks above. Veracode's 2025 report found that AI-generated code introduced risky security flaws in 45% of its tests. Test data in the preview is fine.
- Are vibe-coded websites secure?
A brochure site with no logins and no forms has little to attack. Once there are logins, customer records, payments or an AI button, it is only as secure as its access rules and keys. Checks 1 to 4 test both.
- How do I make sure my vibe-coded app is secure?
Write down what the app holds and who may see it (step 1), then try to break that as each kind of user and as a signed-out visitor (step 2). Search the published app's files and the Git history for keys (step 3), close sign-up, cap paid calls (steps 4 and 5), and verify payment webhooks (step 6).
- Can AI check its own code for security?
It finds missing access rules, exposed keys and packages with known holes. It can't know your business rules, such as which cleaner may see which door code. Give it your data map and ask for a review against it (step 7), then confirm the findings with the tests in step 2.
- Is vibe coding risky for a small business?
In our example the two risks were door codes every cleaner could read and a quote function open to signed-out visitors, where 10,000 scripted calls would cost about $160. An access rule (step 2), a per-user limit and a spend limit on the provider account (step 5) fix both.
