AI coding tools optimize for "it works", not "it is safe". Studies of AI-generated code keep finding security flaws in a large share of output. Before real users and real money touch your app, run through this checklist.
Keys and secrets
- No secret keys in the browser. Search your frontend for
sk_,service_roleandOPENAI. Only public, restricted keys belong there. - Rotate anything that leaked. If a key was ever in a public repo or the client bundle, assume it is compromised.
Data access
- Row-level security is on for every table (Supabase) or rules are locked down (Firebase).
- Policies are tested with two accounts. Log in as user B and try to read user A's records through the API, not just the UI.
- Storage buckets are not public unless they are meant to be.
Authentication and roles
- Admin checks happen on the server. Hiding a button is not security.
- Password reset and email confirmation work and links expire.
- Rate limiting on login and forms to stop brute force and spam.
Payments and inputs
- Plans are activated by verified Stripe webhooks, never by a success page the user can reload.
- All inputs are validated on the server (types, lengths, allowed values).
- File uploads are restricted by type and size and scanned where needed.
Maintenance
- Dependencies are updated and you have error monitoring and backups in place.
Found problems?
You are not alone. These are the most common issues we fix. Our AI App Rescue includes a security review and fixes critical issues first. If the app is already live with real data, contact us for a same-day response.
Frequently asked questions
What is the most common security problem in AI-built apps?
Exposed secret keys in frontend code and missing or misconfigured database access rules (such as Supabase row-level security) are the most common and most dangerous issues.
How do I test Supabase row-level security?
Create two user accounts. Signed in as the second user, try to read and update the first user's rows directly through the Supabase API. If it works, your policies need fixing.
Do I need a security audit before launching an AI-built app?
If the app stores personal data or takes payments, yes. A short review before launch is far cheaper than a data breach.
Need hands-on help?
AR Webcrafts is a fully remote software team registered in Wyoming, USA. We build SaaS, web apps and WordPress, rescue stuck AI-built apps and work white label for agencies worldwide.
Talk to an engineerBook a free 30-min call