Vibe coding security: the complete pre-launch checklist
Read in : Français

Contents
- Why are vibe-coded apps such easy targets?
- The checklist at a glance
- Section 1: is your database closed to strangers?
- Section 2: is a secret key lying around somewhere?
- Section 3: can user A see user B's data?
- Section 4: are user accounts properly protected?
- Section 5: can someone get a paid plan without paying?
- Section 6: can typed text run code?
- Section 7: do your dependencies have known flaws?
- Section 8: is the site served correctly?
- Section 9: can you roll back in five minutes?
- Section 10: are you compliant and safe from a surprise bill?
- How do you test your database like an attacker in 5 minutes?
- What prompt should you use to have the AI audit your app?
- Should you bring in a professional?
- Frequently asked questions
- Frequently asked questions
- Sources
Vibe coding security comes down to one idea: the AI builds what you ask for, and nobody asked it to protect your users. An app generated with Lovable, Bolt or Cursor can look polished and still leave its database open to anyone. Here is the checklist to run before launch, section by section, with tests you can do yourself.
Why are vibe-coded apps such easy targets?
Vibe-coded apps are easy targets because the most common flaws are invisible when everything "works". Nothing on screen tells you that a stranger can read your customer table with three lines of terminal commands.
Three published figures give a sense of scale:
- 45%: in its GenAI Code Security Report published in July 2025, Veracode tested more than 100 large language models on 80 coding tasks; in 45% of cases the generated code introduced a security flaw. It is a benchmark built around known weaknesses, not a measure of all production code, but the trend is clear.
- 9.3 out of 10: that is the CVSS severity score of CVE-2025-48757, which describes insufficient row-level security in sites generated by Lovable up to 15 April 2025, letting unauthenticated attackers read or write database tables. Lovable disputes it, arguing that each customer is responsible for protecting their own app's data.
- 2x: according to GitGuardian's State of Secrets Sprawl 2026 report (March 2026), AI-assisted commits leaked secrets such as keys and passwords at roughly double the GitHub-wide rate in 2025.
The industry reference list of web risks, the OWASP Top 10, puts broken access control in first place in its 2025 edition. That is the textbook vibe coding flaw: the app never checks whether the person asking for a record is allowed to see it.
The checklist at a glance
Here are the 10 sections, ordered by severity. The first three alone prevent most disasters.
| Section | The question to ask | Severity if missed | Time |
|---|---|---|---|
| 1. Data access | Can a stranger read my database? | Critical | 20 min |
| 2. Keys and secrets | Is a secret key in the browser or on GitHub? | Critical | 15 min |
| 3. Access control | Can user A see user B's data? | Critical | 15 min |
| 4. Authentication | Are accounts properly protected? | High | 10 min |
| 5. Payments | Can someone get a subscription without paying? | High | 10 min |
| 6. User input | Can typed text run code? | High | 10 min |
| 7. Dependencies | Do my packages have known flaws? | Medium | 5 min |
| 8. Hosting and HTTPS | Is the site served correctly? | Medium | 10 min |
| 9. Backups and versions | Can I roll back? | Medium | 10 min |
| 10. Personal data and costs | Am I compliant and safe from a surprise bill? | Medium | 15 min |
Section 1: is your database closed to strangers?
Your database must refuse every read and write that is not covered by an explicit rule. With Supabase, the database most vibe coding tools plug into, that job belongs to Row Level Security (RLS).
Your app talks to the database directly with a public key (the publishable key, or the older anon key), which anyone can see in the browser. That is expected. What protects your data is the RLS rules, not the key. The Supabase documentation is explicit: a table in an exposed schema without RLS can be read and written by any role that has been granted access to it.
Check that:
- RLS is enabled on every table in the
publicschema. - Each table has one policy per operation (
select,insert,update,delete), not one catch-all policy. - No
using (true)policy protects private data (that expression means "everyone"). - Views are created with
security_invoker = true; otherwise they bypass RLS. - The Supabase Security Advisor (under Advisors) shows no errors, especially
rls_disabled_in_public.
The full walkthrough, with SQL policies to copy, is in Supabase RLS: the mistake that exposes your users' data.
Section 2: is a secret key lying around somewhere?
A secret key must never appear in code shipped to the browser or in a GitHub repository. Anything in your front end can be read by any visitor who opens developer tools.
The classic traps:
- Any variable prefixed with
VITE_orNEXT_PUBLIC_is bundled into the code sent to the browser. The Vite docs say plainly that these variables should not contain API keys. - The Supabase
service_rolekey (or the newersb_secret_...key) bypasses all RLS. It has no business on the client. - An OpenAI or Anthropic key called straight from the browser lets anyone drain your credit. OpenAI puts it this way: never deploy your key in client-side environments like browsers or mobile apps.
Check that:
- A search of your code for
sk-,sk_live_,sb_secret_andservice_rolefinds nothing in front-end files. - Your
.envfile is listed in.gitignore. - Calls to paid APIs go through a server function (Edge Function, API route).
- A spending limit is set with every API provider.
The step-by-step method is in API keys: why they must never live in your front end.
Section 3: can user A see user B's data?
Access control checks that every request concerns data the signed-in user is entitled to. It is risk number one in the OWASP Top 10 2025, and AI tools often skip it because it does not show up on screen.
The typical symptom: /invoices/123 shows your invoice, and /invoices/124 shows someone else's.
Run this test:
- Create two accounts, A and B, in two different browsers (or one private window).
- As A, create a record (a project, a note, an order) and copy its ID from the URL.
- As B, paste that URL. You should see nothing.
- Repeat for editing and deleting.
If B sees anything, the filter only exists in the interface. You need a rule in the database (RLS) or on the server.
Section 4: are user accounts properly protected?
Authentication should rely on a proven service, not a home-made system the AI improvised. Supabase Auth, Clerk and Firebase Auth already handle password storage, sessions and password resets.
Check that:
- You use your platform's authentication service, not a
userstable holding plain-text passwords. - Email confirmation is on if your app warrants it.
- Allowed redirect URLs (after sign-in, after password reset) only include your own domain.
- Roles (admin, customer) live in a field users cannot edit. Supabase's docs warn against using
user_metadatafor authorization, because users can change it, and recommendapp_metadatainstead.
More on this: authentication in a vibe-coded app without security holes.
Section 5: can someone get a paid plan without paying?
A payment only counts once your server has received it from Stripe and verified its signature. A "thanks for your purchase" page that unlocks the subscription in the browser can be bypassed by typing the URL.
Check that:
- Paid access is granted by a Stripe webhook, on the server.
- The webhook verifies the
Stripe-Signatureheader with thewhsec_...secret. The Stripe docs explain that without this check, an attacker could send fake events to trigger orders or grant account access. - The webhook handles duplicates: Stripe may deliver the same event more than once.
sk_live_keys stay on the server.
The full setup: Stripe payments in a vibe-coded app.
Section 6: can typed text run code?
Anything a user types must be treated as text, never as code. This is the injection family (A05 in the OWASP Top 10 2025): SQL injection, XSS (a script slipped into a page), and prompt injection for apps that use an AI model.
Quick test: in every text field (name, comment, bio), enter <img src=x onerror=alert(1)>. If an alert pops up when the data is displayed, your app is vulnerable to XSS.
Check that:
- There is no
dangerouslySetInnerHTML(React) orv-html(Vue) on user content, unless you run it through a sanitising library. - SQL goes through the Supabase client or parameterised queries, never string concatenation.
- If your app gives an AI agent tools (email, database, web), malicious text cannot make it take a sensitive action without confirmation. See prompt injection.
Section 7: do your dependencies have known flaws?
Every package the AI installs should exist, be maintained and have no known vulnerability. The OWASP Top 10 2025 added a dedicated category for this, Software Supply Chain Failures (A03).
Check that:
npm auditshows nohighorcriticalissues, or you have fixed them.- Every unfamiliar package exists on npmjs.com, with regular downloads and a recent release. A model can invent a package name, and someone may have published it since.
- Dependabot alerts are on for your GitHub repository.
npm audit
npm audit fix
Section 8: is the site served correctly?
Your app should only be served over HTTPS, with basic security headers. Vercel, Netlify and most hosts provide the HTTPS certificate for free.
Check that:
http://redirects tohttps://.- Your URL gets a decent grade in the free MDN HTTP Observatory, which analyses your HTTP headers and suggests fixes.
- You have at least a Content Security Policy (CSP), which MDN describes as a defence against cross-site scripting.
Choosing a host is covered in Vercel, Netlify or shared hosting.
Section 9: can you roll back in five minutes?
A production app needs a recoverable code version and a database backup. Without both, one bad AI edit can wipe out weeks of work or customer data.
Check that:
- Your code is in Git, with a commit for every working version. Git for vibe coders explains the method in four commands.
- Your database is backed up. On Supabase, Pro projects get automatic daily backups with the last 7 days available; for the free plan, the docs recommend exporting your data yourself with
supabase db dumpand keeping it off-site. - You test big changes on a copy before touching the live version: see staging and backups.
Section 10: are you compliant and safe from a surprise bill?
Before welcoming users in the EU or UK you need to meet GDPR requirements, and before leaving the app to run on its own you need to cap your costs.
Check that:
- A privacy policy states what data you collect, why, and which providers store it. Details in GDPR and your vibe-coded app.
- Users can ask for their account to be deleted.
- Spending caps are active with your AI provider, your host and your database. Cost lines are broken down in what a vibe-coded app really costs.
How do you test your database like an attacker in 5 minutes?
The most telling test is to query your database directly with the public key anyone can find in your site. If the response contains private data, you have a problem.
- Open your site, then developer tools (F12), Network tab.
- Reload and find a request to
supabase.co. Note the project URL and the value of theapikeyheader. - In a terminal, run:
curl "https://YOUR-PROJECT.supabase.co/rest/v1/TABLE_NAME?select=*" \
-H "apikey: YOUR_PUBLIC_KEY"
- An empty
[]or a permission error on a private table is good news. A list of your users or their data means you should enable RLS right now.
Do it for every table. A request of exactly this kind, against Supabase's public API, is what exposed the flaw behind CVE-2025-48757.
What prompt should you use to have the AI audit your app?
An AI audits better when you give it a role, a precise list and an output format. This prompt works in Lovable, Bolt, Claude Code or Cursor:
You are an application security auditor. Analyse this project and answer
point by point, without fixing anything yet:
1. List every database table. For each one: RLS enabled (yes/no),
existing policies per operation, and who can read/write.
2. List every environment variable and flag the ones exposed to the
browser (VITE_, NEXT_PUBLIC_ prefixes, etc.). Flag any secret key
present on the client.
3. For every page that loads a record by ID, say whether ownership by
the signed-in user is checked on the server or in the database.
4. Explain how paid access is granted and whether Stripe webhook
signatures are verified.
5. List every place where user-supplied HTML is rendered.
6. Rate each issue critical, high or medium. Propose the smallest fix,
without changing the rest of the code.
You can also turn on built-in scanners: Lovable runs a security scan in its publish dialog, and Supabase has a Security Advisor. They are useful guardrails, not guarantees.
Should you bring in a professional?
The right call depends on what you store and how many people are exposed. A simple decision tree:
- If your app is a personal tool or a demo with no real data: this checklist is enough.
- If you store accounts, emails and private content for a few dozen users: run the full checklist and the tests above, and ask a developer you trust to review it.
- If you take payments or handle sensitive data (health, finance, minors): get a professional audit before opening the doors.
- If the app runs your business (customers, revenue): plan an audit, a staging environment and a response plan for a breach.
To learn how to check AI output yourself without being a developer, read testing AI-generated code. For the bigger picture, see the complete vibe coding guide and 12 mistakes that sink vibe coding projects.
Frequently asked questions
Frequently asked questions
Is vibe coding a security risk?
Vibe coding is not dangerous in itself, but it makes flaws easy to create and hard to spot. AI tools generate code that works without necessarily applying access rules, secret handling or input validation. The risk comes from launching without checking. With a checklist like this one and two simple tests (querying the database with the public key, and cross-checking two accounts), you remove most of the common problems.
Is the Supabase anon key visible in my site a vulnerability?
No. Supabase's public key (publishable or anon) is designed to be visible in the browser. It only grants what your RLS policies allow. The vulnerability is a table without RLS, or with a policy that is too broad. The key you must never expose is the secret key (service_role or sb_secret), which bypasses every rule. If it has leaked, rotate it immediately.
Do Lovable or Bolt secure my app automatically?
These tools add guardrails, such as Lovable's security scan before publishing, but they do not guarantee your app is secure. In disputing CVE-2025-48757, Lovable itself argued that each customer is responsible for protecting their application's data. Use the built-in scanners, then check database access and the separation between accounts yourself, using the two tests described above.
How long does it take to secure a vibe-coded app?
For a small app with a Supabase database and a handful of tables, allow one to two hours to work through this checklist and run the tests. Fixes are often faster than diagnosis: enabling RLS and writing four policies per table takes minutes with the right prompt. Payments and sensitive data take longer and deserve a professional review before launch.
What should I do if I find out data has leaked?
Close the hole first: enable RLS, rotate every exposed key, and sign users out if needed. Then work out what could have been read and by whom, using your database and hosting logs. If personal data of people in the EU or UK is involved, GDPR requires you to notify your supervisory authority, where feasible within 72 hours of becoming aware, unless the breach is unlikely to pose a risk.
Sources
- OWASP Top 10:2025 — OWASP Foundation
- Row Level Security — Supabase Docs
- Understanding API keys — Supabase Docs
- Database Advisors — Supabase Docs
- Database Backups — Supabase Docs
- CVE-2025-48757 — NIST National Vulnerability Database
- AI-Generated Code Poses Major Security Risks in Nearly Half of All Development Tasks — Veracode
- The State of Secrets Sprawl 2026 — GitGuardian
- Best Practices for API Key Safety — OpenAI Help Center
- Env Variables and Modes — Vite
- Receive Stripe events in your webhook endpoint — Stripe Docs
- Content Security Policy (CSP) — MDN
- HTTP Observatory — MDN
- Security — Lovable Documentation
- Art. 33 GDPR: Notification of a personal data breach — gdpr-info.eu


