Security checklist before launching an AI-built website
Updated · by the Bologu team
Tools like Lovable, Cursor, Bolt and v0 let you build a working site in a few hours, but AI is trained to make the app work first. Things that don't break the app right away, like permission checks, hiding keys or rate limits, are often skipped. This checklist collects the 20 issues we see most in AI-built sites, to go through before real users arrive.
Keys and secrets
- No secret keys in front-end code: Open F12 → Sources and search for sk-, sk_live, service_role, secret. Nothing should match.
- No secret variables starting with NEXT_PUBLIC_ or VITE_: These prefixes send the value to everyone who opens the site.
- No .env file on GitHub: .env must be in .gitignore, and any key that was ever committed must be replaced.
- Source maps off in production: Otherwise anyone can read your original source code.
Database
- RLS on for every Supabase table: See how to check and the SQL to fix it in the Supabase RLS guide.
- No using (true) policies on personal data: And no policies that only check whether someone is logged in.
- Storage for private files is private: Payment slips, ID cards and customer documents must not open for anyone but their owner.
- Firebase Security Rules don't allow everyone to read and write: Rules like allow read, write: if true are for prototyping only.
Permissions and login
- Admin pages check permissions on the server: Hiding a button isn't protection; people can call the API directly.
- Every API returning personal data requires login: And returns only the logged-in user's own data.
- Users can't change their role, credits or prices: These values must be calculated and saved on the server only.
- Login and sign-up pages limit attempts: To stop password guessing and mass fake sign-ups.
Payments and costs
- Stripe webhooks verify signatures: Otherwise anyone can send a fake “paid” message.
- Prices come from the server, not the page: Never create a payment from an amount the browser sent.
- AI is called through the server with max_tokens and rate limits: And a monthly spending cap is set on the provider's Billing page.
- Public forms have a CAPTCHA or rate limit: Contact and waitlist forms are favorite targets for spam bots.
Site settings and the law
- HTTPS on every page, plus security headers: At least HSTS, X-Content-Type-Options and protection against framing.
- No known vulnerabilities in Next.js or libraries: Update to the latest patch release, and don't load CDN scripts at @latest.
- A privacy policy that meets your local law: Every form that collects email or phone numbers should link to it.
- Alerts when the site errors: Such as Sentry, so you find out before customers complain.
What to fix first
Short on time? Go by the damage each can do:
- Leaked keys that can spend money (replace them today; read how to handle a leaked key)
- A database outsiders can read or change (read the Supabase RLS guide)
- APIs and admin pages without permission checks
- Payments that can be faked
- Costs, site settings and privacy law
Getting your AI to fix them
Don't just tell your AI to “make it secure”: that usually gets shallow fixes. Give it one problem at a time, saying which file, what to change and how to test that it's fixed. Bologu's report gives you a prompt like that for every issue, ready to paste into Cursor, Lovable or Claude.
Start with a free website scan to check what's visible from outside, then use the GitHub code scan for the points that need server-side code, such as permission checks and webhooks.
