Most AI-built apps are insecure in the same three places: database rules that do not restrict access, secret keys shipped to the browser, and server logic that trusts whatever the client sends. None of these stop the app from working in a demo, which is exactly why AI tools produce them and why founders discover them only after real users arrive.
Why AI tools generate insecure defaults
The AI's job is to make your request work on screen. Security is invisible in a demo: an app with wide open database rules looks identical to a secured one, right up until someone hostile shows up. When a generated rule blocks the feature you asked for, the common "fix" the AI reaches for is loosening the rule, and now the feature works and the data is public. Multiply that by fifty prompts and you get the typical vibe coded security posture.
The ten minute self-check
Supabase apps:
- In the dashboard, open each table and confirm Row Level Security is enabled. A table without RLS and exposed through the API is readable by anyone with your public URL and anon key, which is everyone, because both ship in your frontend.
- Read the policies that exist. A policy of true on select means public. AI tools write that one a lot.
- Search your frontend code for the service role key. It belongs on a server only. In the browser it is a master key to your entire database.
Firebase apps:
- Open your Firestore rules. If you see allow read, write: if true, or a rules expiry date that someone extended to make errors go away, your database is open.
- Test as a stranger: sign in with a second account and try to read the first account's documents by ID. Rules that only check that a user is logged in still let every user read every other user's data.
Any app that charges money:
- Confirm the amount charged is computed on the server, not read from the client. Open dev tools, edit the price in the request, and see what happens. If the discount works, so will zero.
What data exposure actually costs
For a Canadian business, a breach of customer personal information triggers PIPEDA reporting obligations, and in Quebec, Law 25 adds its own notification duties and penalties. The practical cost is smaller but sharper: one screenshot of exposed customer data on social media ends a small product's reputation the week it launches.
If you found a problem
Do not paste your rules into a public forum asking for help, because the post itself maps your attack surface. Lock the table or collection down completely first, even if it breaks features, then fix properly. Broken features lose you a day. Leaked data loses you the company.
A professional audit covers all of the above plus the parts you cannot self-check: schema drift, injection paths in edge functions, webhook verification, and the query patterns that fail under load. Fixed price, written report, about a week.