{"slug": "built-your-app-with-ai-10-security-checks-before-real-users-sign-up", "title": "Built your app with AI? 10 security checks before real users sign up", "summary": "A developer published a ten-point pre-launch security checklist for AI-built apps, citing a November 2026 Crissy Field study of 159,041 Lovable projects that found many exposed personal and confidential data without a login. The checklist covers verifying Supabase Row Level Security, testing for broken access control by swapping record IDs between two test accounts, scanning client bundles for leaked secrets such as service_role keys, and authenticating inside Next.js Server Actions, which are reachable by direct POST requests.", "body_md": "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.\n\nThis 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?](https://www.vishalsolanki.online/blog/lovable-supabase-app-data-exposed-rls-check).\n\nAttackers 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.\n\nSo before you invite real users, run these ten checks. Most take a few minutes and need no coding.\n\n**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.\n\n*Last checked: 22 November 2026.*\n\nIf 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.\n\nThat 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.\n\n**Test it:** follow the 15-minute check in my [Lovable and Supabase post](https://www.vishalsolanki.online/blog/lovable-supabase-app-data-exposed-rls-check). It shows how to list tables with RLS switched off and how to request your own data with only the public key.\n\nEven 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.\n\n**Test it:**\n\n`/orders/123`), try changing the number while logged in as A.\nIf 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.\n\nAnything that ends up in the browser can be read by anyone. Both big frameworks are explicit about which settings go there:\n\n`NEXT_PUBLIC_` is written into the JavaScript bundle sent to the browser.`VITE_` is exposed in the client code. Vite's docs say these variables should not contain sensitive information such as API keys.\nAdding 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.\n\n**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.\n\n**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.\n\nIn 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.\n\n**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.\n\nI wrote a full [10-point checklist for Server Actions](https://www.vishalsolanki.online/blog/secure-nextjs-server-actions) covering auth, ownership checks, validation and rate limits.\n\nWithout 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.\n\n**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](https://www.vishalsolanki.online/blog/secure-nextjs-server-actions) has a working rate-limit example.\n\nIf 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.\n\n**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.\n\nProfile 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)](https://www.vishalsolanki.online/blog/upload2shell-cve-2026-125396-fix) showed a crafted file running commands on servers through ordinary PDF previews and image thumbnails.\n\n**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.\n\nYour 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.\n\n**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](https://www.vishalsolanki.online/blog/nextjs-november-2026-security-release-16-4-5) shows what that looks like in practice.\n\nDevelopment 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`.\n\n**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).\n\nIf 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](https://www.vishalsolanki.online/blog/ai-coding-agent-prompt-injection-claude-md-agents-md).\n\n**Check:** only run agents on code you trust, review what they change before you deploy, and don't give them production keys.\n\n`npm audit` is clean, or you know why it isn't\nIt 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.\n\nYes. 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.\n\nUsually not. Most of these are configuration and server-side checks you can add to the app you already have.\n\nBuilt 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](https://www.vishalsolanki.online/#contact).\n\nI'm Vishal, a [freelance Next.js developer in Noida](https://www.vishalsolanki.online/freelance-nextjs-developer-noida). Need help with your own site? [See how I work](https://www.vishalsolanki.online/website-developer-noida).\n\n*Originally published on [vishalsolanki.online](https://www.vishalsolanki.online/blog/ai-built-app-security-checklist-before-launch).*", "url": "https://wpnews.pro/news/built-your-app-with-ai-10-security-checks-before-real-users-sign-up", "canonical_source": "https://dev.to/vishall/built-your-app-with-ai-10-security-checks-before-real-users-sign-up-26o4", "published_at": "2026-11-21 21:35:17+00:00", "updated_at": "2026-11-21 21:42:58.826517+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-safety", "developer-tools"], "entities": ["Crissy Field", "Lovable", "Supabase", "Next.js", "OWASP", "Vite"], "also_reported_by": [], "takeaway": "AI-built apps often ship with Supabase RLS disabled or service_role keys exposed in client bundles, so test with two accounts and a logged-out request before launch and rotate any key that reached the browser.", "recommendation": {"advice": "Before launch, create two test accounts and try to read one's records from the other, call forms and Server Actions while logged out, and grep the client bundle for service_role or secret keys, rotating any you find.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/built-your-app-with-ai-10-security-checks-before-real-users-sign-up", "markdown": "https://wpnews.pro/news/built-your-app-with-ai-10-security-checks-before-real-users-sign-up.md", "text": "https://wpnews.pro/news/built-your-app-with-ai-10-security-checks-before-real-users-sign-up.txt", "jsonld": "https://wpnews.pro/news/built-your-app-with-ai-10-security-checks-before-real-users-sign-up.jsonld"}}