Harden a vibe-coded app before launch
Vibe-coded app hacked twice in its first days · Security incident · X · @infinitelogins · Jun 2025
A builder shipped a Lovable/Cursor + Supabase app in three days. Researchers then wrote to the database via a Postgres view that bypassed RLS, and created accounts through Supabase Auth sign-ups that were never switched off.
Lesson
Define views as SECURITY INVOKER and disable Supabase Auth sign-ups you don't use.
Fix prompt
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I'm a beginner building an app with Lovable. Please review how login, sessions and access control work in my project. 1) Explain in plain English how a user signs in, how long a session lasts and what happens on logout. 2) Check that sessions expire, that logout really ends the session on the server, and that every API route and database query checks the user is allowed to see that data (not only the UI). 3) List each problem you find with the file name and a suggested fix, most serious first. 4) Give me a short manual test plan: log in, log out, wait for expiry, and try to open another user's data with a second account. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Source: X ↗