An app built with Lovable, Bolt, Cursor or Replit can look finished in the preview and still be unsafe on launch day. The preview hides the part that matters: real users, a real domain, a real cache and a database that strangers can reach.
This month made that very concrete. Security researchers at Crissy Field looked at 159,041 Lovable projects found through the public Common Crawl archive. On 24,664 of those sites, database records arrived in the browser as soon as the page loaded, with no login. The researchers are careful to say that alone is not a leak, because some data is meant to be public. But on 7,403 sites they found email addresses in readable tables, and in individual apps they found passport numbers, payment details and more than 200,000 private chat messages. The write-up drew more than 1,000 points on Hacker News.
Lovable's Head of Security replied in that thread and named the root cause: insufficient Row-Level Security. In other words, the database told every visitor everything, because nobody wrote the rule that says who may read which row.
The same few failures, every time
I have been building production software for 14+ years, including healthcare systems like HealthHavenRx that run across all 50 US states and commerce platforms like NiceOne with more than 4 million customers. The failures I see in AI-built apps are not exotic. They are the same short list, and the builders who post in r/lovable and r/Supabase this month describe them the same way.
- Users seeing each other's data. A QA engineer in r/boltnewbuilders put it at the top of their launch list, next to login that breaks on the live domain, refreshes that 404 and checkouts that charge twice.
- Database rules switched off or wide open. An r/Supabase thread this month pointed out that AI edits tend to add a policy of using (true), and that a brand new table ships with RLS off.
- Secret keys in the JavaScript bundle. A Stripe live key or a Supabase service_role key in client code gives every visitor admin rights.
- Config files on the public web. A downloadable .env file or .git folder gives away database passwords and your whole source history.
- Per-user pages in a shared cache. Put a CDN or page cache in front of a dashboard and the next visitor can be shown the last visitor's account.
- Deep links that 404 on refresh, and plain HTTP that never redirects to HTTPS.
Most of these are visible from outside in a few seconds. You do not need access to the code to see that /.env downloads, or that a script contains sk_live_. So I turned the outside part of my checklist into a tool.
What I built: a smoke check you run after every deploy
I added it to nextjs-vps-starter, the open-source setup Devoun uses to self-host Next.js on a VPS. It has no dependencies and needs only Node 20. You point it at your live site, tell it which pages must load directly and which pages belong to a single user, and it runs nine checks.
- Is the home page up, and does http:// redirect to https:// on the same host?
- Can anyone download /.env, /.env.local, /.env.production, /app.env or /.git/config?
- Do the home page or the scripts it loads contain a Stripe live key, a Supabase service_role key, a private key, an AWS key, a GitHub token or an Anthropic key? Findings are shown redacted, never in full.
- Do your deep links load on a direct visit, and do unknown URLs return a real 404?
- Are your private pages kept out of the shared cache, and does a cached page ever set a cookie?
- Are HSTS, nosniff and clickjacking protection in place?
It exits with code 1 when anything fails, so it can be the last step of a deploy script or a CI job. Running it is one line: npx github:devoun-official/nextjs-vps-starter followed by your URL, with --deep for your important pages and --private for pages like /dashboard.
I ran it on my own sites first
Before writing this I ran it against devoun.com. Eight checks passed and one warned: the site does not send an HSTS header, which tells browsers to never try plain HTTP again. That is a real gap on my own site, and it goes on my list. The first run also found a bug in the tool itself. Next.js redirects /pricing to /pricing/ when trailing slashes are on, and the check counted that redirect as a broken page. It now follows redirects that stay on the same site.
I also had the code reviewed for security before publishing, and that review found real problems: a path like //evil.com could send requests to another host, a hostile page could freeze two of the pattern checks, and a huge response was read fully into memory. All of that is fixed and covered by tests. The suite has 48 tests with 98% line coverage, and it runs on every push.
What it cannot see
Here is the honest part. The biggest leak this month, missing Row-Level Security, is mostly invisible from outside. A smoke check reads public responses. It does not log in, it does not query your database, and it cannot tell you that table invoices lets any signed-in user read every row. That needs a person, or at least a second test account.
So do this by hand before you launch. Open Supabase, go to Authentication and then Policies, and look at every table. A table with RLS on and no policy is locked. A policy of true is public. Then create two test users, log in as the first, and try to open the second user's records by changing an id in the URL or the request. If you can, so can anyone. Check your storage buckets the same way, because people forget them after fixing tables.
If you would rather not do this alone
Using a good tool to reach real users fast is not a mistake. But once real users arrive, they are the reason the app has to hold. That is the work I do at Devoun: we audit and fix AI-built apps for security, payments, data and uptime, with fixed prices. Run the free check first. If it fails, or if your database rules make you nervous, talk to us.