Guide

Vibe coding security checklist: 5 holes AI-built apps ship with, and how to close them

A vibe coding security checklist matters because apps built quickly with Lovable, Bolt, v0, Cursor, Claude Code and Replit keep shipping the same five holes: secret keys baked into the frontend, database protection left off, access control that only hides a link instead of enforcing it, admin pages that are merely hidden, and no rate limiting on sign-up or AI endpoints. None of it is a flaw in the tools — these are configuration decisions an AI assistant was never told to get right. This guide goes through each hole: what goes wrong, how to test it yourself in about two minutes, how to fix it, and which Relvato monitor catches it again if it comes back.

Why the same five holes keep showing up

Lovable, Bolt, v0, Cursor, Claude Code and Replit are good at turning a prompt into a working app fast — a sign-up form, a dashboard, a checkout flow. None of them can tell you, on their own, that a database table should refuse a signed-out request, or that an environment variable with the wrong prefix ships straight into the browser. Those are configuration decisions, not code an AI assistant watches fail.

The five holes below turn up across different frameworks and different AI tools because they share one cause: something that looks private from inside the editor is public the moment the app goes live. Each section says what goes wrong, how to test it yourself in about two minutes, how to fix it, and which Relvato monitor catches it again if it comes back.

1. Secret keys baked into the frontend

A Stripe secret key or an OpenAI or Anthropic key, typed straight into a .env file, often ends up public without anyone meaning it to. Vite compiles every `VITE_`-prefixed variable into the bundle it ships to the browser — its own docs warn that these variables "should not contain sensitive information" — and Next.js does the same for `NEXT_PUBLIC_`, inlining the value into the JavaScript sent to every visitor at build time. A key with that prefix isn't hidden; it's published.

Keys leak a second way that's easy to miss: through the instruction files AI coding tools read, such as AGENTS.md, CLAUDE.md or .cursorrules. Commit one with a real key pasted inside for the assistant's convenience, or let the build serve it alongside the site by mistake, and it's as readable as anything else in the page source.

Test it yourself in under two minutes: open your deployed site, view the page source or the built JavaScript, and search for `sk_`, `sk-`, `service_role`, or whatever prefix your provider's keys use. If it's there, it's public, whatever the variable was named.

Fix it by rotating the key at the provider first — a key that's been public can't be trusted again, however quickly you remove it — then move the call that uses it into a server or edge function the browser never reaches.

What watches it: the free vibe coding security checker reads your app's page and scripts for a leaked key, free and without an account. The Exposure scan does the same on a schedule once you verify the site, including keys leaking through an AI tool's instruction file served with it, and flags a newly exposed one on its next run (weekly on Free, daily on paid plans, and after each deploy once you connect your repository or host).

2. Database security switched off

Apps built with Lovable, Bolt or v0 often talk to Supabase straight from the browser, with the publishable (anon) key sitting in the page — and that part is fine, because Supabase's own docs say that key "is meant to be public" and safe to ship in a browser. What actually protects the rows behind it is Row Level Security. Supabase's RLS docs are direct about what happens without it: a table in an exposed schema "is readable and writable by any role with a grant on it," which by default includes anyone holding the public key.

Test it yourself: using the publishable key from your own site's script, request a table while signed out — for example `curl 'https://<ref>.supabase.co/rest/v1/<table>?select=*&limit=1' -H 'apikey: <publishable key>'`. Rows coming back mean anyone can read that table, whether they've signed in or not.

Fix it by turning on Row Level Security on every table in an exposed schema, and writing a policy for each one — `(select auth.uid()) = user_id` for a read, for instance. A Firebase app needs the same thing done in its security rules, which Firebase's own docs call "the only safeguard blocking access for malicious users" once a client talks to the database directly. Either way, never ship the service_role (or Firebase admin) key to the browser: it bypasses Row Level Security entirely.

What watches it: the Exposure scan requests one row from each table your site's scripts name, signed out, the same way a visitor's browser could, and keeps only the column names. A table that answers with email, phone, password, token or payment columns is reported as an issue; another open table is a warning, since products or posts are often public on purpose. It only sees tables your scripts actually name, and a clean result isn't proof the rest of your rules are right. Proven sites only.

3. Changing the ID in the URL shows someone else's record

This is broken access control, and OWASP's Top 10 2021 moved it up to the number one spot. Its write-up names exactly this pattern as an example: "permitting viewing or editing someone else's account, by providing its unique identifier" — what security people call an insecure direct object reference, or IDOR.

Test it yourself: make two test accounts. Sign in as account B, open a record that belongs to account A by changing the ID in the address bar, and see whether it opens.

Fix it on the server, for every record: confirm the signed-in user owns the row before returning it — through Row Level Security or your own authorization logic — never by relying on the ID being hard to guess. An unguessable ID slows down a casual look; it isn't access control.

What watches it: the Access control monitor is opt-in. You give it a test account, a page it should be able to see that carries a marker only that account should see, and the addresses of other users' records it must never see. Signed in as your test account, it opens each one and reports what it found, weekly.

4. Admin pages that are only hidden

Removing the admin link from the menu doesn't remove the route — it only stops a visitor from finding it by accident. An admin email that's just the obvious one, such as admin@yourdomain.com, gives away just as much.

Fix it by enforcing the admin role on the server for every admin route and every API endpoint behind it, not only in the menu that decides what to show, and turn on two-factor sign-in for every admin account.

What watches it, honestly: on WordPress, the Admin roster monitor reports a new or hidden administrator and a sign-in with no two-factor set up. For other apps, probing /admin from outside isn't automated by default — on a single-page app the route answers the same whichever page it is, so an outside probe reports false alarms that mean nothing. The Access control monitor can still test one admin URL you name, signed in as a non-admin test account, the same way it tests any other record.

5. No rate limiting

A login, sign-up or password-reset form with no limit lets an attacker try a list of leaked passwords by the thousand. An AI endpoint with no limit lets anyone run up your OpenAI or Anthropic bill instead: OWASP's API Security Top 10 lists unrestricted resource consumption as its own category, and one of its example attacks is a password-reset flow that triggers a paid SMS on every request, run until the bill runs into the thousands.

Fix it with a limit per IP and per account, at the edge or in the app, and with a spending cap set at the provider. OWASP's own advice here is blunt: set a limit with every service provider you call, or at least a billing alert, so a flood turns into a refused request instead of a surprise invoice.

What watches it: the Rate limiting monitor is opt-in — you name one endpoint, and Relvato sends it 10 to 30 harmless requests within seconds, from outside your firewall's allowlist on purpose, weekly by default. It reports only whether the site ever slowed the burst down or refused it, not how strict the limit is. Pick a request that can't lock a real account, such as a wrong password tried against one made for this.

Three more things worth two minutes

A source map tells a browser, and anyone who asks for it, exactly which original file and line a piece of minified code came from — useful in development, a map of your app's own logic once it's left switched on in production. Most frameworks that ship them by default have a one-line setting to turn them off for the production build.

A missing security header — no HSTS, no Content-Security-Policy, no X-Frame-Options — doesn't open a door on its own, but it removes a layer that would otherwise have slowed an attacker down once something else went wrong.

A CORS rule that reflects back whatever Origin asked, combined with `Access-Control-Allow-Credentials: true`, lets any site on the internet read your API using a visitor's own cookies or session — exactly what a browser's own rules otherwise refuse on your behalf. Name the origins you trust instead of mirroring whatever showed up.

What watches it: the Exposure scan covers all three — source maps left in production, cookie flags, and a CORS rule that hands data to other sites — alongside the headers above.

What monitoring needs, and what it can't do

The free vibe coding security checker runs once, for anyone, no account needed: point it at your app's address and it reads the page and its scripts for a leaked key, a published source map, a loose CORS rule or a missing header. The Exposure scan does the same thing on a schedule once you verify the site — no install needed, the way monitoring for AI-built apps describes — plus the database probe that needs a site it has already verified. The Access control and Rate limiting monitors are opt-in on top of that, because they need something from you first: a test account, or an endpoint you're willing to have hit with a short burst. Both run weekly by default once the site is proven.

Monitoring tells you when one of these five holes opens again — after a redeploy, after you ask an AI assistant for one more feature, after a dependency update quietly changes a default. It doesn't review your code, and it can't prove a database policy or an access check holds everywhere it should; a clean run means nothing it tested was wrong, not that nothing is. Treat this checklist the way you'd treat any other: the five things worth setting once, and the ones worth hearing about the day they come undone.

Vibe coding security checklist: the hole, and what watches it

The holeHow to fix itWhat watches it
Secret keys in the frontendRotate the key, then move the call server-sideExposure scan: keys in scripts and AI tool instruction files
Database security switched offEnable Row Level Security (or Firebase rules) on every table, with an ownership policyExposure scan: reads one row per named table, signed out
Changing the ID shows another user's record (IDOR)Confirm ownership on the server for every record, not just the linkAccess control monitor: opens other users' records signed in as a test account
Admin pages only hiddenEnforce the admin role on the server for every route and APINot automated off WordPress (false alarms on single-page apps); access control monitor can test one named URL
No rate limitingPer-IP and per-account limits, plus provider spending capsRate limiting monitor: a short burst, reports whether it slowed or refused
Source maps published in productionTurn them off in the production buildExposure scan
Missing headers, a CORS rule that trusts any origin with credentialsAdd standard security headers; name the origins you trustExposure scan

Questions, answered

Are apps built with Lovable, Bolt or v0 secure by default?

No tool promises that, and these don't either. Vibe coded app security comes down to configuration — whether a database table is open to the internet, or a secret key ended up in the browser bundle — not something an AI assistant was told to get right on its own. The five holes in this checklist are the ones that show up most often.

Why do VITE_ and NEXT_PUBLIC_ variables end up public?

Because that's what they're built for. Vite compiles every `VITE_`-prefixed variable into the JavaScript it ships to the browser, and Next.js does the same for `NEXT_PUBLIC_`, so either framework can pass ordinary configuration — an analytics ID, a public API URL — to client-side code. The mistake is putting a secret key behind that prefix instead of a plain one, which both frameworks keep server-only.

What is Row Level Security, and do I need it?

A Postgres feature, used by Supabase, that adds a rule to every query on a table so a user only sees the rows they're allowed to. You need it on every table in a schema your app's public key can reach — without it, that table answers anyone holding the key, signed in or not. A Firebase app needs the equivalent written into its security rules.

What is IDOR?

An insecure direct object reference: changing an ID in a URL or request to view or edit a record that isn't yours. OWASP's Top 10 names it directly, under broken access control — the single most common category in its 2021 list. The fix is confirming ownership on the server for every record, not making the ID hard to guess.

My app has no public sign-up form — do I still need rate limiting?

If it calls an AI API, yes. A sign-up or login form with no limit invites credential stuffing; an AI endpoint with no limit invites a bill, not a break-in. Either way, the fix is the same: a limit per IP or per account, plus a spending cap set at the provider.

Can I just hide the admin link instead of fixing access control?

No — the route still answers if someone requests it directly, with or without a link pointing at it. Enforce the admin role on the server for every admin route and API it calls, and add two-factor sign-in for every admin account.

Sources

Related reading
Guide

Know the day an update reopens one of these holes.

Run the free checker once, or verify your site so Relvato keeps watching after every deploy — and tests access control and rate limits on the ones you opt in.