Vibe coding security: a 10-point checklist before your app goes live
AI-built apps keep leaking data through the same few mistakes. Here are the risks, the real incidents behind them, and a checklist you can run in an afternoon.
The short answer
The biggest risks in vibe-coded apps are a database anyone can read because its access rules are off, secret keys shipped inside the app, sign-in checks that are missing or backwards, and users who can change their own role. Before launch, turn on row-level security for every table, keep secret keys on the server, test the app signed out and as a second user, and make sure nobody can make themselves an admin.
Facts checked 30 Nov 2026
Why this keeps happening
Veracode's 2025 GenAI Code Security Report tested code from more than 100 models on 80 tasks and found security flaws in 45% of cases. Its July 2026 report put the average security pass rate at about 56%, barely changed in a year; its October 2026 update found the first real gain, to 62%, which still leaves nearly four tasks in ten with a known flaw. AI writes code that works on the first try; it does not reliably write code that is safe.
The incidents follow the same pattern. A March 2025 flaw in Lovable-generated projects (CVE-2025-48757) left more than 170 apps without proper database access rules. In February 2026, Wiz found that the database behind Moltbook exposed 35,000 email addresses and 1.5 million API tokens, again because row-level security was missing. In September 2026, UpGuard reported 16,326 Supabase databases with tables anyone could read, more than half of them showing signs of personal information.
The checklist
1. Row-level security on every table. In Supabase, the public "anon" key is safe only when RLS is on and the policies limit each user to their own rows. Tables created by code, which is how AI agents create them, may not have it on.
2. No secret keys in the app. Anything shipped to a browser or phone can be read. Service-role keys, payment secret keys and AI keys belong on the server only.
3. Test signed out. Open every page and call every endpoint without signing in. Anything private that still loads is a leak.
4. Test as a second user. Sign in as a different customer and try to open the first customer's order or profile by changing the ID in the address.
5. Nobody can promote themselves. A customer must not be able to set their own role to admin, their balance, or their discount.
6. Coupon and gift codes matched exactly. A search that treats % or _ as wildcards can let someone guess a valid code.
7. Rate limits on sign-in, sign-up and contact forms, so a bot can't try a million passwords or send spam through your site.
8. Payment success confirmed by the payment provider, not by a page the customer can open.
9. Uploaded files checked for type and size, and stored where only the right people can read them.
10. Keys rotated if they were ever committed to code or pasted into a chat.
What to do if you find a leak
Turn the access rule on first, then rotate every key that could have been seen. Check your database logs for reads you don't recognise. If personal data was exposed, the law where you and your customers live may require you to tell them; get advice.
What Chirai does about it
Chirai writes the database rules with the site: each customer can read and change only their own rows, and nobody can make themselves an admin, premium or richer. Coupon and gift codes are matched exactly. Before a site goes live, its publish checks test the real site for these problems, and database rule problems are closed on the spot. Before a phone app goes to the stores, Chirai stops it if a secret key is inside the app.
Checks lower the risk; they don't remove it. Run the list above on anything you launch, whoever built it.
Questions people ask
Is vibe coding safe?
It can be, but not by default. Studies find security flaws in close to half of AI-written code, and real apps have leaked data through missing database rules and exposed keys. Run a security checklist before launch and test the app signed out and as a second user.
Is the Supabase anon key safe to expose?
Yes, but only when row-level security is enabled on every table and the policies limit what each user can read and write. Without RLS, the anon key gives broad access to the database.
What is row-level security?
A database rule that decides which rows each signed-in user can see or change. With it, a customer sees only their own orders; without it, anyone with the public key may see everyone's.
How do I check if my vibe-coded app is leaking data?
Sign out and try to open private pages, sign in as a second user and try to open the first user's records, and look in the database dashboard for tables without row-level security. Also search your app's code for secret keys.
Sources
How this article was made: it was drafted with automated writing tools and published by Chirai. Facts about other products, stores and rules are checked against the sources listed, on the date shown; where no source is listed, the article is general advice and Chirai’s own description of its product. What it says about Chirai is what Chirai does on a build, not a promise about the result. A first build can still miss something you asked for, and the build’s story lists it. If something here is wrong or out of date, write to support-note@chirai.dev and it will be corrected. Facts last checked 30 Nov 2026.
Try this prompt
Build a members-only community site for my running club: members sign up, see the training calendar, join runs, post in a club feed, and see only their own payments. Committee members can approve new members.
Build it with Chirai