Back to The Haunt
Building with AI3 min read

Your vibe-coded app works. Is it safe to launch?

Vibe coding gets you from an idea to a working app in an evening. The app works because you tried it the way you meant it to be used. Security problems live in the ways you did not try: a second user, a curious visitor with the browser's developer tools open, or a script calling your API a thousand times.

The failures are rarely exotic. In 2025 a researcher scanned 1,645 apps from Lovable's public showcase and reported 170 whose database tables anyone could read or write with only the public key built into the page, because row-level security was missing or misconfigured. Lovable disputes the CVE, saying each customer is responsible for their own app's data. Either way, whoever launches the app owns its security.

Eight checks before launch

  • No secrets in the browser. Open your live site, view the source and the JavaScript files, and search for "key", "secret" and "token". Anything there is public. Keys meant for the browser are fine; keys for payments, email or AI APIs are not. Move those to the server, then rotate them, because deleting a leaked key from the code does not un-leak it.
  • Database rules on every table. If the browser talks to your database directly, as it can with Supabase or Firebase, the rules are your only protection. Turn on row-level security for every table and write a policy for each. Then sign in as one user and try to read another user's rows.
  • Permissions checked on the server. Hiding a button is not access control. For every action, the server must check that this user may do this to this record. Try changing an ID in a URL or a request to someone else's.
  • No queries built from text. Search for database queries or shell commands assembled from strings and user input. Use parameterised queries instead.
  • Input validated on the server. Browser form checks are a convenience. Send requests without the form: an empty field, a huge value, a negative number.
  • Rate limits on sign-in, sign-up and anything that costs money. An endpoint that calls a paid AI API with no limit is a bill waiting for a script.
  • Every package real and intended. Assistants sometimes import packages that do not exist, and attackers register those names. See slopsquatting.
  • Debug features switched off. Stack traces on error pages, admin routes, test accounts and open API docs should not reach production.

Ask, then verify

You can ask your assistant to review the app against this list, and it will find things. It may also tell you row-level security is enabled on a table it never touched. For each answer, ask it to show you the line of code or the setting, then try the attack yourself. If it cannot show you, assume it is not there.

None of this replaces a professional review for an app that handles payments, health records or other sensitive data. It does catch the mistakes that most often turn a weekend project into a leak.

The AI code review checklist covers security alongside the other checks for AI-written changes. The free book Checked, Not Trusted teaches the habit behind them: decide what you would see if the code were wrong, then go and look.

That’s it. Come back soon; the ghost keeps writing.Follow by RSS

Read next.