Your AI-built Firebase app is probably running on open rules right now. This starter gives you the lockdown: the deny-all rules file, the 12 holes to grep for, and the launch checklist. Copy them, deploy, breathe — then open things back up deliberately.
Get the lockdown rules ↓Free for any number of your own projects. Not for resale or redistribution.
A complete firestore.rules that denies everything from clients, with a staged migration path in its comments: tourniquet → inventory → open collection by collection → prove each opening with tests. The Admin SDK bypasses rules, so your backend keeps working while clients are locked out.
deny-all-starter.rules — also printed in full below.
The recurring failures in AI-generated Firebase apps — open rules, roles in user docs, client-set prices, secrets in the bundle, no backups — each with its fix. Grep your codebase for all twelve.
AI-BUILDER-HOLES.md — summarised below.
The pre-launch pass: rules, App Check, auth settings, backups, quotas, monitoring. The launch blockers are marked — do not ship with one unchecked.
Save as firestore.rules, deploy with firebase deploy --only firestore:rules. Your app will stop working for real users until you open collections back up — deliberately, one at a time, using the migration path at the bottom of the file. That breakage is the point: an open database is worse than a paused one.
Each hole is the same decision: the client was trusted with something only a server may decide. Full write-ups with exploits in AI-BUILDER-HOLES.md.
| 1 | Open rules — allow read, write: if true | Deploy the deny-all starter above, today. |
| 2 | “Signed in” treated as “authorised” | Ownership + role checks on every rule block. |
| 3 | Roles stored in Firestore docs | Roles live in custom claims, set only via Admin SDK. |
| 4 | No field validation | Field allowlists + type/size caps on every write. |
| 5 | Client-set timestamps and IDs | Ownership fields must equal request.auth.uid; timestamps must equal request.time. |
| 6 | Public + private data in one document | Split public profile from private owner-only doc. |
| 7 | Client-declared payment success | Orders are born pending; paid is Admin-SDK-only. |
| 8 | Client-supplied prices and totals | Server recomputes totals from /products at checkout. |
| 9 | No App Check | Register + enforce App Check (monitor first). |
| 10 | Secrets / service accounts in the client or repo | Move to server + secrets manager; rotate anything leaked. |
| 11 | Storage left wide open | Per-user paths, owner checks, size/type limits. |
| 12 | No backups, no budget alerts, no monitoring | PITR + scheduled exports + billing alerts. |
Condensed from LAUNCH-CHECKLIST.md (10 sections, 60–90 minutes with rules deployed).
The free starter stops the bleeding. The full LaunchGuard packet finishes the job: production rules for all four app archetypes (SaaS, content, e-commerce, deny-all migration), the 40-question security self-audit, the rules unit-test starter with real assertions, and the App Check / custom-claims / backups guides.
Launch — $79 (one project) · Studio — $199 (up to 5 projects, client work included). One purchase, no subscription. 14-day “Safe to Ship” guarantee.
See the full LaunchGuard packet → · Order by email: shloimyf33107+counterkit@gmail.com (subject “LaunchGuard order”).