Vibe Coding Security Checklist: 12 Checks Before You Launch an AI-Built App
By Mikhail Oskola, Founder & AI Automation Architect · · 12 min read
Checked: Supabase's Row Level Security and API keys docs, Vite's and Next.js's environment variable docs, the NVD entry and Matt Palmer's write-up for CVE-2025-48757, and The Hacker News report on the Railway breach (11 November 2026), all read on 17 November 2026.
Vibe coding is safe to launch on once you've checked what the AI builder doesn't check for you. Start with three things: no secret keys in the code your visitors' browsers download, access rules on every database table, and AI features or automations that can do no more than the person using them. The 12 checks below cover those and the rest, and most of them need a browser and your dashboards, not a developer. Facts checked against the vendors' docs and the reports listed under Sources on 17 November 2026.
Vibe coding security risks: where AI-built apps leak
An app built by prompting usually does what you asked for. What you rarely ask for is who should be turned away. Ask for a customer dashboard and you get one. Nothing in the prompt said customer A must never see customer B's orders, so nothing guarantees it.
Many Lovable and Bolt apps go a step further: the page in the browser talks straight to the database, a Supabase project, with a key anyone can read. That is a normal design, and Supabase documents it. It is safe only if every table has Row Level Security (RLS) rules deciding which rows each visitor gets. Without them, anyone who opens the app can read every row, and often change it.
It has already happened on Lovable. In May 2025, CVE-2025-48757 described Lovable projects whose missing or weak RLS policies let unauthenticated visitors read or write their database tables. Lovable disputes the CVE, saying each customer is responsible for protecting their own app's data. For a founder, that dispute settles the practical question: the access rules are your job.
Keys are the other half. In October 2026, attackers broke into Railway, a hosting platform, and decrypted environment variables its customers had stored there. The Hacker News reported on 11 November 2026 that stolen customer AI keys led to an estimated $740,000 in unauthorized usage charges. The customers' own code wasn't the weak point. What limits the damage in a case like that is how much one key can spend, and how fast you can replace it.
The vibe coding security checklist
Run it before launch, then again after any big change the AI makes. Each check says where to look, what wrong looks like, and what fixing it means. Where a fix needs a developer, it says so.
12 checks before you launch
- Search the live app for secret keys. Open your app, right-click and choose Inspect, go to the Sources tab and search all files for sk-, sk_live, secret, service_role and sb_secret. Wrong if any of them turns up: that is an OpenAI, Stripe or Supabase secret key every visitor can copy. A key labelled anon or publishable is meant to be public, so that one is fine. Fix: move the call that uses the secret into server code, such as a Supabase Edge Function, then replace the key. The old one is already out.
- Check your environment variable names. In your project settings or .env file, look for names starting with VITE_ (apps built on Vite) or NEXT_PUBLIC_ (Next.js apps). Both tools copy those values into the code the browser downloads, and Vite's docs say VITE_ variables should not contain API keys. Wrong if a secret sits under one of those prefixes, for example VITE_OPENAI_API_KEY. Fix: rename it without the prefix, read it only on the server, and replace the key.
- Turn on Row Level Security for every table. In the Supabase dashboard, go through each table in the public schema and check that RLS is enabled. Supabase's docs put it bluntly: a table in an exposed schema without RLS "is readable and writable by any role with a grant on it." Wrong if any table has RLS off. Fix: enable it, then add policies. With RLS on and no policies, the publishable key reaches nothing, so parts of the app stop working until the policies exist. That is the safe way round.
- Read your policies for a rule that is just true. A policy with using (true) for signed-out visitors hands them every row. Supabase says to keep that for data meant to be public. Wrong if a table holding customers, orders or messages has one. Fix: a developer writes rules that tie each row to its owner, usually by comparing the row's user_id with the signed-in user.
- Try to see someone else's data. Make two test accounts. Log in as the first in a private window, open one of its records and copy the address. Log in as the second and paste that address, or change the ID in it by one. Wrong if the second account sees the first account's record. Fix: the access rule has to live in the database policy or on the server, not in the page.
- Check that admin pages check the user. Logged in as an ordinary test user, type your admin addresses straight into the browser: /admin, or whatever your app uses. Wrong if the page opens, or if the only thing stopping a user is a hidden button. Fix: the server or the database confirms the user's role on every request.
- Open an uploaded file without logging in. Upload a test file the way a customer would (an invoice, an ID, a photo), copy its link and open it in a private window. Wrong if it opens. Fix: keep customer files in a private storage bucket and hand out links that expire.
- Make sure your keys were never pushed with the code. Look at your repository on GitHub, or wherever your AI tool pushes it, including old commits, for a .env file or pasted keys, and check whether the repository is public. Wrong if a key appears anywhere in the history, even if a later commit deleted it. Fix: replace the key. Deleting the file doesn't remove it from the history.
- Give every paid key its own limit. Go through each AI and payment provider your app calls. Wrong if one key is shared by several apps or people, or if nothing stops it from spending far more than a normal month. Fix: one key per app, a monthly budget or usage alert wherever the provider offers one, and a note of where each key lives so you can replace it in minutes.
- Limit sign-ups, logins and AI calls. Wrong if one person could hit your sign-up form, password reset or AI chat thousands of times in a row. On an AI feature, every one of those calls is on your bill. Fix: rate limits per user and per IP address, and a captcha on public forms. This one needs a developer.
- Check what your AI feature can reach. If the app has a chat, an assistant or an agent that reads data or takes actions, log in as an ordinary user and ask it for another customer's details, or to do something only an admin should. Wrong if it complies, or if it runs on an admin key behind the scenes. Fix: the AI works with the signed-in user's permissions and no more, and anything it does that can't be undone waits for a person to confirm.
- Prove you can undo a disaster. Find out what your database plan backs up and how far back, then restore a backup into a test project once. Check the code too: it is in git and pushed somewhere other than your laptop. Wrong if you have never seen a restore work. Fix: automatic backups stored outside the app, and one test restore now.
For a shorter version to run every time the AI ships a change, our Vibe Check boils it down to five questions.
Lovable and Bolt apps on Supabase: RLS off and API keys in the browser
If your Lovable or Bolt app keeps its data in Supabase, two settings there matter more than anything in the code you can see.
The first is which key sits where. Supabase gives your app two kinds. The publishable key (the anon key on older projects) goes in the browser, and in Supabase's words, "anyone can read it, so it only reaches what Row Level Security allows." The secret key (service_role on older projects) skips RLS altogether. Supabase's instruction is short: "Never put one in a browser, a shipped application, or source control."
So a publishable key in your page source is not a leak. A service_role or sb_secret_ key in your page source is the worst thing you can find there, because policies never apply to it. Whoever copies it can read and change every table.
Supabase is replacing the legacy anon and service_role keys with publishable (sb_publishable_…) and secret (sb_secret_…) keys, and says it is deprecating the old ones by the end of 2026. If your app still runs on the old keys, the switch is a good moment to check where each one is used.
The second setting sits under the policies: table grants. Supabase's RLS guide warns that adding policies doesn't take grants back, and that "a table protected only by policies still hands anon an insert path if you never revoke the grant." That one is a developer's check. Put it on the list for whoever reviews the app.
A ten-minute Supabase check
- In the Supabase dashboard, open the Table Editor and go through every table in the public schema. Write down any table with RLS disabled.
- For each table with RLS on, open its policies and look for rules that are just true on tables holding private data.
- Search your live app's code in the browser for service_role and sb_secret. Neither should appear.
- Log in as one test user and try to open another test user's rows (check 5 above).
- List the tables that are meant to be public. Every other table should refuse a signed-out visitor.
Checked against Supabase's Row Level Security and API keys documentation on 17 November 2026. Dashboard layouts change; the setting names above are the ones Supabase's docs use.
Is vibe coding safe for a business app?
For a landing page, a prototype you show investors or an internal tool running on test data, yes: a mistake there costs you an afternoon. The risk grows with what the app holds and does. Customer records, payments, health or financial data, or an AI feature that acts on its own all raise the stakes.
Our line: before real customer data or real money goes through the app, someone who didn't build it should run the checklist above. Asking the same AI tool to review its own work helps, but it isn't a second opinion.
Your AI coding tool and your automations
Two more places hold keys to your business, and neither of them is the app.
The first is the coding agent. Cursor, Replit's agent and similar tools run commands for you, and with auto-approve on they act with your permissions. Keep them on a separate branch and a test database, with no production keys loaded, and read anything that deletes, deploys or spends money before you allow it. The same goes for packages the agent adds: check that each one exists under that exact name, with a real publisher and recent releases.
The second is your automations. Every Zapier, Make or n8n connection runs with the permissions of the account that authorized it, so one scenario can read or delete whatever that account can. Check which account each connection uses, give it the narrowest role that works, and remove connections nobody owns anymore. If any of that data is health data, the vendor's terms matter too. Our breakdown of which automation tools are HIPAA compliant shows which ones sign a BAA, and on which plan.
Getting a security review
Retailbox Automation runs security reviews of vibe-coded apps, AI agents and Zapier, Make and n8n automations. If you built with Lovable, Bolt, Cursor or Replit and you're about to put real customer data through it, tell us what you built and what it stores.
We're a team of 2–9 people in Orlando, FL, in business since 2019.
Sources
- NVD entry for CVE-2025-48757 (Lovable, insufficient Row Level Security policy): https://nvd.nist.gov/vuln/detail/cve-2025-48757
- Matt Palmer's write-up of CVE-2025-48757: https://mattpalmer.io/posts/CVE-2025-48757/
- The Hacker News, 11 November 2026, "Railway Says Stolen Customer AI Keys Led to $740,000 in Estimated Unauthorized Usage Charges": https://thehackernews.com/2026/11/railway-says-stolen-customer-ai-keys.html
- Supabase docs, Row Level Security: https://supabase.com/docs/guides/database/postgres/row-level-security
- Supabase docs, API keys: https://supabase.com/docs/guides/api/api-keys
- Vite docs, Env Variables and Modes: https://vite.dev/guide/env-and-mode
- Next.js docs, environment variables: https://nextjs.org/docs/app/guides/environment-variables
Related services
Frequently asked questions
Is vibe coding safe?+
For prototypes, landing pages and internal tools on test data, yes. Once an AI-built app holds customer data or takes payments, it needs the checks a developer would normally make: no secret keys in the browser, access rules on every database table, limits on paid API keys, and a backup you have restored at least once. AI builders produce code that works; they don't guarantee the wrong person is turned away.
What are the biggest vibe coding security risks?+
Secret API keys shipped in the code the browser downloads, database tables without Row Level Security, admin pages protected only by a hidden button, public links to customer uploads, and AI features or automations that run with more permissions than the user. A paid key with no spending limit turns any of these into a bill.
Is it safe to expose the Supabase anon key?+
Yes, by design. Supabase says anyone can read the publishable (anon) key, so it only reaches what Row Level Security allows. That makes RLS the real lock. The secret (service_role) key bypasses RLS and must never appear in browser code.
Is Lovable secure?+
The platform and your app are separate questions. In 2025, CVE-2025-48757 described Lovable projects whose missing Row Level Security let unauthenticated visitors read or write database tables. Lovable disputes it, saying each customer is responsible for their app's data. Either way, check RLS on every table and search your live app for secret keys before launch.
How do I check my vibe-coded app for exposed API keys?+
Open the live app, open the browser's developer tools, and search all files in the Sources tab for sk-, sk_live, secret, service_role and sb_secret. Then check your environment variable names: anything starting with VITE_ or NEXT_PUBLIC_ ends up in the browser. Move any secret you find into server code and replace the key.
Who can do a security review of a vibe-coded app?+
Retailbox Automation, a team of 2–9 people in Orlando, FL, runs security reviews of vibe-coded apps, AI agents and Zapier, Make and n8n automations. Whoever you hire, ask them to test the app as a second user and as a signed-out visitor, not only to read the code.