Vibe coding security checklist: 12 common holes in AI-built apps

You built an app with Lovable, Bolt, Cursor, Replit or another AI tool. It works. People can sign up, maybe even pay. Whether it is locked is a separate question.

An AI builder is good at “make it work” and less reliable at “make sure nobody else can read this”. It writes code that does what you asked, and security is often the part you didn’t ask for.

This vibe coding security checklist is for founders and makers who want to check their own app before real users (or an investor) do. It covers the 12 holes that show up again and again in AI-built apps, most of them on a Supabase backend. Each item says what the hole is, why it matters, how to check it yourself and how to fix it.

You don’t need to be a developer to work through it. Some checks take two minutes in a dashboard. A few need someone who can read code.

Before you start: 3 things to understand

1. Some keys are meant to be public. Others never are. Your Supabase project has a public key (called anon, or in newer projects a “publishable” key starting with sb_publishable_). Supabase says this key is safe to show in the browser. In their words, “Anyone can read it, so it only reaches what Row Level Security allows” (Supabase docs). The secret key (service_role, or sb_secret_ in newer projects) is different, because it bypasses all your access rules. The same split exists for Stripe (publishable pk_ and secret sk_) and for AI providers such as OpenAI, which only have secret keys.

2. The browser is not a safe place. Anyone who opens your app can read everything it sends to the browser, including the JavaScript code, the keys inside it and the answers your database sends back. Hiding a button does not hide the data behind it.

3. The database must enforce the rules. In a typical Lovable or Bolt app, the browser talks straight to the database. So the database itself has to decide who may read and change which rows. In Supabase that is Row Level Security (RLS). If RLS is missing or too loose, your public key opens more than you think.

Most of the checklist follows from these three.

The checklist

1. Row Level Security is off on tables

What it is. RLS is the Supabase feature that decides which rows each user may see or change. It is set per table. Supabase’s own docs say a table in an exposed schema without RLS “is readable and writable by any role with a grant on it” (Supabase RLS docs).

Why it matters. With RLS off, anyone who has your public key (which is in your website’s code) may be able to read, change or delete the data in that table, such as user profiles, orders or messages.

Check it yourself.

select tablename, rowsecurity
from pg_tables
where schemaname = 'public';

Every row should show rowsecurity = true. Views are not in this list. They skip RLS by default, so a view on a private table can still expose it, and the Advisors warn about such views.

How to fix. Turn RLS on for every table in public, then add policies for what each user may do. With RLS on and no policies, nothing is reachable with the public key, so your app may stop working until the policies exist. Do it in a test project first. More in our Lovable guide.

2. RLS policies that allow everyone (using (true))

What it is. RLS is on, but the policy says “everyone may do everything”. AI tools sometimes write this to make an error go away.

Why it matters. The dashboard says RLS is on, so it looks safe. In practice it’s the same as item 1.

Check it yourself. In the SQL Editor:

select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public';

Look for qual or with_check that is just true, on select, insert, update or delete, for the anon or public role (public means everyone, including logged-out visitors). An insert policy only has with_check, and true there lets anyone add rows. true for authenticated is not much better, because anyone can sign up and log in. A policy that lets everyone read a public product catalogue can be fine. On a profiles or orders table it isn’t.

How to fix. Replace true with a real rule, usually “this row belongs to the logged-in user”, for example using (auth.uid() = user_id). Write separate policies for reading, inserting, updating and deleting (for inserts the rule goes in with check).

3. Secret keys in frontend code

What it is. A secret key (Supabase service_role / sb_secret_, Stripe sk_live_, an OpenAI key) ends up in code that runs in the browser.

Why it matters. Anyone can copy it. The Supabase secret key skips all your RLS rules, an AI key lets someone run up your bill, and a Stripe secret key lets them act on your Stripe account.

Check it yourself.

How to fix. Move every call that needs a secret key to the server side, for example a Supabase Edge Function or another backend function. Then rotate the key. Create a new key, put it in your server-side secret settings and redeploy, then disable or delete the old one. In that order, your app keeps working.

In Supabase, creating new keys does not switch off the legacy ones by itself. A legacy service_role key can’t be rotated on its own (changing the JWT secret also replaces the anon key and logs everyone out), so the usual route is to move to the new sb_secret_ / sb_publishable_ keys and then disable the legacy keys. In Stripe, roll the secret key in the dashboard. Once a key has been public, assume someone has it.

4. Secrets committed to your GitHub repo

What it is. A .env file or a hard-coded key was committed to Git.

Why it matters. Even in a private repo, anyone with access (a freelancer, a tool, a leaked token) can read it. In a public repo, the whole internet can. Deleting the file later does not help, because Git keeps the history.

Check it yourself.

How to fix. Rotate every key that was ever committed, in the order from item 3. Then put secrets only in your host’s environment settings or your backend’s secret store, never in files that go into Git.

5. Access checks only in the UI, not on the server

What it is. The app hides the “Delete” button or the admin menu for normal users, but the database or API would still accept the request.

Why it matters. Anyone can send a request directly, without your buttons. The UI only decides what people see.

Check it yourself. For every important action (delete, edit someone else’s data, change a role, see all orders), find the rule that blocks a normal user. If the only rule is that the button isn’t shown, the hole is there. Then test it with two test accounts of your own, A and B. Logged in as A, try to see or change B’s data, and watch the browser’s network tab for data that loads but isn’t shown.

How to fix. Put the rule where the data lives, in RLS policies (items 1-2) or in the server function that does the action.

6. Stripe webhooks without signature verification

What it is. Stripe tells your app “this payment succeeded” by calling a webhook URL. If your code doesn’t check that the call really came from Stripe, anyone can call that URL.

Why it matters. Stripe’s own docs warn that without verification “an attacker could send fake webhook events to your endpoint to trigger actions like fulfilling orders, granting account access, or modifying records” (Stripe docs). In practice, someone could give themselves a premium account for free.

Check it yourself. Open your webhook code (often a Supabase Edge Function). Look for the Stripe-Signature header and a call such as constructEvent (or constructEventAsync, or parseEventNotification for Stripe’s newer “thin” events) with a secret that starts with whsec_. If the code just reads the JSON and acts on it, verification is missing.

How to fix. Verify the signature with Stripe’s official library, using the raw request body (not parsed JSON) and the endpoint’s signing secret. Make sure the code stops with an error (status 400) when the check fails, instead of logging it and carrying on. Also handle the same event arriving twice. More in our Lovable guide.

If you’re not sure your app passes so far, a developer can check these points for you. Book a Rescue Review (€150).

7. Public storage buckets holding private files

What it is. Uploaded files (ID scans, invoices, private photos) sit in a storage bucket marked “public”.

Why it matters. Supabase explains that files in a public bucket can be fetched by anyone who has the URL (Supabase Storage docs). And URLs leak, for example in emails, logs and shared links.

Check it yourself. In the Supabase dashboard, go to Storage and note for each bucket whether it is public and what kind of files it holds.

How to fix. Make buckets with private files private, add storage policies so each user only reaches their own files, and serve files through signed URLs that expire.

8. No rate limits

What it is. Nothing stops one person from calling your login, signup form or AI feature a thousand times a minute.

Why it matters. Someone can guess passwords on your login form or use your contact form for spam. AI endpoints are where it gets expensive. Each call costs you money at your AI provider, so an endpoint without limits is a cost risk.

Check it yourself. List every action that sends email, calls an AI model or checks a password, and check whether each has a limit per user or per IP address. Look at your auth provider’s rate-limit settings too, and see in your AI provider’s dashboard whether a monthly budget or usage limit is set.

How to fix. Add limits per user and per IP address on the server side, require login for AI features where you can, and set a spending limit at your AI provider if it offers one.

9. Edge or serverless functions that don’t check who is calling (or what they send)

What it is. A backend function (Supabase Edge Function, Vercel or Netlify function) can do a lot, often with the secret key, but doesn’t check who is asking or what they sent.

Why it matters. These functions are where secret keys live, so they are the doors into your system. A function that accepts any user ID or any amount in its input lets a caller act as someone else, or change a price.

Check it yourself. For each function, check three things in the code:

  1. It looks up the logged-in user from the request’s token and refuses if there is none. A request that only carries your public key is not a logged-in user, so the platform’s default token check is not enough on its own.
  2. It checks that this user may do this action on this data.
  3. It checks the input (type, length, allowed values) instead of trusting it. Prices and user IDs should come from your own database or the token, never from the request.

How to fix. Add those three checks to every function. A schema validation library (for example Zod in TypeScript) makes the input check short.

10. Admin pages reachable by guessing the URL

What it is. There is an /admin page. It’s not in the menu, so it feels hidden.

Why it matters. URLs like /admin and /dashboard are the first thing people try. If the page only hides itself in the UI, and the data behind it isn’t protected (items 1, 2 and 5), the admin panel is open.

Check it yourself. Log in as a normal test user and type the admin URL. Then log out and try again. Watch whether anything shows up, even for a second, and whether data loads in the browser’s network tab.

How to fix. Store the admin role in the database (not in something the user can edit, such as Supabase user_metadata or a role column in a profile the user may update), check it in RLS policies and server functions, and make the page redirect when the check fails.

11. Outdated packages with known vulnerabilities

What it is. Your app uses dozens of open-source packages. Some of them get security fixes over time. AI tools rarely update them on their own.

Why it matters. Known vulnerabilities are public, which makes them the easiest kind to abuse. The OWASP Top 10, the standard list of web security risks, has a category for this, called “Software Supply Chain Failures” in the 2025 edition (“Vulnerable and Outdated Components” in 2021).

Check it yourself. In your project folder, run npm audit (npm docs). On GitHub, turn on Dependabot alerts in the repo’s security settings.

How to fix. Update packages with “high” or “critical” findings first, one at a time, and test after each. A forced update of everything at once can break your app in ways the AI then tries to “fix”.

12. Personal data without GDPR basics

What it is. Your app stores names, emails, maybe more. If you are based in the EU, or your app is offered to people in the EU, the GDPR (in Dutch: AVG) applies to how you handle that (European Commission).

Why it matters. Holes 1 to 11 are also data-protection problems, because a table anyone can read is a data leak. Users also have the right to know what you store and to have it deleted. This is not legal advice. The four basics below are practical steps.

Check it yourself.

How to fix. Collect less, lock down what you keep, check the data processing agreements of the services you use, and write a simple delete procedure. For legal questions, ask a privacy lawyer.

One more before launch: backups

Backups are what saves you when something goes wrong, including an AI change that deletes data. Supabase makes daily backups on paid plans (Pro, Team, Enterprise) and recommends that free-plan projects export their data regularly themselves. Database backups also do not include files in Storage (Supabase backups docs). Check your plan, and try a restore once in a test project, so you know it works before you need it.

Using AI to fix security issues safely (without getting stuck in the “Try to fix” loop)

You can ask your AI tool to fix most of these, and it often works. A few habits make it work better.

Security fixes are where the “Try to fix” loop is most costly. Each round can burn credits. And a half-fixed policy can be worse than none, because the dashboard now says “RLS on” while the data is still open.

Stop after three attempts. If the same problem is still there by then, more rounds rarely help, because the cause usually sits somewhere the AI isn’t looking. That is the moment to have a developer read the code, for example with a Rescue Review. More on breaking the loop in our Lovable guide.

Printable summary

# Check Done
1 RLS is on for every table in public ☐
2 No using (true) policies on private data ☐
3 No secret keys in browser code (VITE_, NEXT_PUBLIC_) ☐
4 No secrets in the Git repo or its history; leaked keys rotated ☐
5 Every access rule is enforced in the database or server, not only the UI ☐
6 Stripe webhooks verify the signature and reject a failed check ☐
7 Private files are in private buckets ☐
8 Rate limits on login, forms and AI features; AI spending limit set ☐
9 Server functions check the user, their rights and the input ☐
10 Admin pages and data are protected by a server-side role check ☐
11 npm audit clean of high/critical findings; alerts on ☐
12 Personal data listed, locked down and deletable ☐
+ Backups exist and a restore has been tested ☐

Want us to check it for you?

If you’re not sure your app passes, or you’re going round in circles asking the AI to fix it, a developer can check it for you.

The Rescue Review is a read-only review of your code and your hosting and database setup. You get:

Book a Rescue Review

FAQ

Is a Lovable (or Bolt) app secure by default?
Not automatically. The tools give you building blocks, such as Supabase with RLS, but whether your app uses them correctly depends on the code that was generated for your app. Check it the way you would check any other app.
Is it a problem that my Supabase anon key is visible in the browser?
No, that key is meant to be public. Supabase says it "only reaches what Row Level Security allows". The problem is when RLS is off or too loose (items 1-2), or when the secret key is in the browser (item 3).
How do I know if RLS is enabled on my tables?
Check the Table Editor and the security advisor in your Supabase dashboard, or run the SQL query from item 1. Every table in public should show RLS on.
Can I ask the AI to fix these security issues itself?
Often, yes. Give it one issue at a time, paste the exact policy or error, and re-check afterwards with the steps above. If the same problem is still there after three attempts, stop and get a developer to look.
The AI says it fixed the security issue. How do I know it really did?
Run the "Check it yourself" step again. If the issue keeps coming back, you are in the loop, and the cause sits somewhere the AI isn't looking. That's what a Rescue Review looks for.
Does my AI-built app need to comply with GDPR?
If it handles personal data and you are based in the EU, or your app is offered to people in the EU, the GDPR applies, no matter which tool built the app. Item 12 lists practical basics. For legal advice, ask a privacy lawyer.
How often should I re-check my app's security?
Before launch, after every big change, and whenever your tools change their defaults. A quick pass through this list every few months is a good habit.

Sumptia Digital is independent and not affiliated with Lovable, StackBlitz (Bolt.new), Replit, Anysphere (Cursor), Supabase or Stripe.