Skip to content

· 8 min read

Built your app with AI? 10 security checks before real users sign up

Lovable, Bolt, v0, Cursor and Claude Code can get an app working in a weekend. Working isn't the same as safe. Ten checks you can run yourself, each with a quick test and the fix: open databases, leaked keys, unprotected actions, uploads, payments and more.

Vishal Solanki · Full-stack developer, Noida

AI app builders and coding agents can take you from an idea to a working app in a weekend. That's genuinely useful. But "it works when I click through it" and "it's safe with real people's data in it" are different tests, and the second one is easy to skip when everything looks finished.

This isn't theoretical. In November 2026, the security firm Crissy Field examined 159,041 Lovable projects and found many where personal and confidential information could be read without logging in. I went through that study in detail in Is your Lovable or Supabase app readable without a login?.

Attackers have AI too. The Next.js team wrote this month that AI has made finding and exploiting old, obscure bugs cheap, which is part of why Next.js published 51 security advisories in 2026 against 14 in 2025. Small apps get found by the same automated tools as big ones.

So before you invite real users, run these ten checks. Most take a few minutes and need no coding.

Short version: make two test accounts and try to see one's data from the other. Search your site's JavaScript for secret keys. Call your forms and actions while logged out. Then update your dependencies. If any of those fail, fix them before launch.

Last checked: 22 November 2026.

1. Can strangers read your database?

If your app uses Supabase, as many AI-built apps do, your browser code talks to the database directly with a publishable key (called the anon key on older projects). Supabase's own docs say that key is safe to expose: anyone can read it, so it can only reach what Row Level Security (RLS) allows. Supabase compares it to a key taped to the front door that only opens the lobby.

That means RLS is the only thing between a stranger and your tables. If RLS is off on a table, or a policy is too loose, anyone with that public key can read it.

Test it: follow the 15-minute check in my Lovable and Supabase post. It shows how to list tables with RLS switched off and how to request your own data with only the public key.

2. Can one user see another user's data?

Even with a login, an app can let user A open user B's order, invoice or profile just by changing an ID in the address bar or in a request. OWASP, the best-known list of web security risks, ranks this kind of problem, Broken Access Control, as number one in its Top 10 for 2025.

Test it:

  1. Create two test accounts, A and B.
  2. As B, create something private: an order, a note, a profile detail.
  3. Copy the address of that page. Log in as A and open it.
  4. If your app uses IDs in addresses (/orders/123), try changing the number while logged in as A.

If A can see B's data, the app checks that you're logged in but not whose record it is. The fix belongs on the server or in the database rules, not in hiding buttons.

3. Are secret keys sitting in your JavaScript?

Anything that ends up in the browser can be read by anyone. Both big frameworks are explicit about which settings go there:

  • Next.js: environment variables are server-only by default. Anything prefixed with NEXT_PUBLIC_ is written into the JavaScript bundle sent to the browser.
  • Vite (used by many React apps): anything prefixed with VITE_ is exposed in the client code. Vite's docs say these variables should not contain sensitive information such as API keys.

Adding one of those prefixes is a quick way to make a "missing key" error go away, and it moves the secret straight into the browser.

Test it: open your live site, open the browser's developer tools (F12), go to the Sources tab and search all files for words like secret, sk_live, sb_secret, service_role and api_key. Also check your project settings: a Supabase secret key (or the older service_role key) bypasses RLS completely, so it must only ever live on a server.

Fix it: move the secret to a server-only variable, call the third-party service from a server route or function instead, and rotate the key, because the old one has already been public.

4. Do your forms and actions check who's calling?

In Next.js, a Server Action is a function your forms call on the server. The Next.js docs warn that once one is created and exported, it's reachable by a direct POST request, not just through your app's buttons, so you should verify authentication and authorisation inside each one. API routes and Supabase Edge Functions work the same way.

Test it: log out, then try the things only logged-in users or admins should do. Open /admin or /dashboard directly. If you're comfortable with developer tools, copy a request from the Network tab and send it again after logging out.

I wrote a full 10-point checklist for Server Actions covering auth, ownership checks, validation and rate limits.

5. Can someone hammer your login or contact form?

Without limits, a bot can try thousands of passwords, flood your contact form, or run up your email and AI bills. Look for anything that sends an email or SMS, calls a paid AI API, or checks a password or one-time code.

Test it: submit a wrong password 20 times in a row, or send the contact form repeatedly. If nothing ever slows you down, add rate limiting, and a bot check on public forms. The Server Actions checklist has a working rate-limit example.

6. Are your payments confirmed by the payment provider?

If your app marks an order as paid or unlocks a plan, that decision must come from your payment provider, not from the browser. With Stripe, that usually means a webhook, and Stripe's docs say to verify that each webhook request really came from Stripe using the Stripe-Signature header.

Test it: find the code that upgrades a user or marks an order paid. If it trusts a "success" page or a value sent from the browser, or the webhook handler doesn't verify the signature, fix that before you take real money.

7. What happens to uploaded files?

Profile photos, PDFs and attachments get resized, previewed and converted on your server, and the libraries doing that work can have bugs of their own. This month's Upload2Shell (CVE-2026-125396) showed a crafted file running commands on servers through ordinary PDF previews and image thumbnails.

Check: limit uploads to the file types you actually need, store them outside your app's code, and keep the server's image and PDF tools updated. If you don't need uploads, don't add them.

8. Are your dependencies up to date?

Your app is built on hundreds of packages, and security fixes arrive often. The Next.js team now ships security releases roughly once a month, and from Next.js 16.4 next dev and next build warn you when your version has a known vulnerability.

Test it: run npm audit and npm outdated in your project, and check your framework version against its latest security release. My post on the November 2026 Next.js security release shows what that looks like in practice.

9. Is your development server open to the internet?

Development servers are built for convenience, not for strangers. In November, Vite fixed a critical bug (rated 9.1 out of 10) that let anyone who could reach an exposed dev server read files and run code. It only affected dev servers opened to the network with --host.

Check: never deploy with npm run dev, don't run a dev server with --host on a shared or public network, and update Vite to a patched release (8.3.7, 8.2.5, 8.1.7, 7.3.8 or 6.4.6, or later).

10. Can your AI coding tool be tricked?

If you keep building with an AI agent, the agent itself is part of your security. Instruction files like AGENTS.md and CLAUDE.md, or text in a cloned repository, can carry instructions you never wrote. I covered how that attack works, and eight defences, in Prompt injection in AI coding agents.

Check: only run agents on code you trust, review what they change before you deploy, and don't give them production keys.

A quick launch checklist

  • RLS is on for every table, and a logged-out request returns nothing private
  • User A can't open user B's records
  • No secret keys in the browser; any exposed key has been rotated
  • Every form, action and API route checks who's calling
  • Logins, sign-ups and contact forms are rate-limited
  • Payments are confirmed by verified webhooks
  • Uploads are limited to the types you need
  • npm audit is clean, or you know why it isn't
  • Production runs a production build, not a dev server
  • Your AI agent has no production secrets

FAQ

Can't I just ask the AI to make it secure?

It helps to ask, and an agent may catch some of these. But it only knows what it can see, which often doesn't include your live database rules or hosting settings. Use it to draft fixes, then confirm each one with the tests above.

My app is small. Does this matter?

Yes. Bots scan the internet automatically, whatever the size of the site. And a small app can still hold people's personal and confidential data, which is exactly what turned up in the Lovable study.

Do I need to rebuild my app?

Usually not. Most of these are configuration and server-side checks you can add to the app you already have.

Sources


Built something with an AI tool and want a second pair of eyes before launch? I can run these checks on your app, fix what fails and show you the before and after. Get in touch.

  • Security
  • AI
  • Next.js
  • Supabase