Security and shipping

Vibe coding security: the complete pre-launch checklist

Published Updated 12 min read

Read in : Français

Contents
  1. Why are vibe-coded apps such easy targets?
  2. The checklist at a glance
  3. Section 1: is your database closed to strangers?
  4. Section 2: is a secret key lying around somewhere?
  5. Section 3: can user A see user B's data?
  6. Section 4: are user accounts properly protected?
  7. Section 5: can someone get a paid plan without paying?
  8. Section 6: can typed text run code?
  9. Section 7: do your dependencies have known flaws?
  10. Section 8: is the site served correctly?
  11. Section 9: can you roll back in five minutes?
  12. Section 10: are you compliant and safe from a surprise bill?
  13. How do you test your database like an attacker in 5 minutes?
  14. What prompt should you use to have the AI audit your app?
  15. Should you bring in a professional?
  16. Frequently asked questions
  17. Frequently asked questions
  18. 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:

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.

SectionThe question to askSeverity if missedTime
1. Data accessCan a stranger read my database?Critical20 min
2. Keys and secretsIs a secret key in the browser or on GitHub?Critical15 min
3. Access controlCan user A see user B's data?Critical15 min
4. AuthenticationAre accounts properly protected?High10 min
5. PaymentsCan someone get a subscription without paying?High10 min
6. User inputCan typed text run code?High10 min
7. DependenciesDo my packages have known flaws?Medium5 min
8. Hosting and HTTPSIs the site served correctly?Medium10 min
9. Backups and versionsCan I roll back?Medium10 min
10. Personal data and costsAm I compliant and safe from a surprise bill?Medium15 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:

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:

Check that:

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:

  1. Create two accounts, A and B, in two different browsers (or one private window).
  2. As A, create a record (a project, a note, an order) and copy its ID from the URL.
  3. As B, paste that URL. You should see nothing.
  4. 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:

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:

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:

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 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:

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:

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:

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.

  1. Open your site, then developer tools (F12), Network tab.
  2. Reload and find a request to supabase.co. Note the project URL and the value of the apikey header.
  3. In a terminal, run:
curl "https://YOUR-PROJECT.supabase.co/rest/v1/TABLE_NAME?select=*" \
  -H "apikey: YOUR_PUBLIC_KEY"
  1. 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:

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