The mistake
Common Firestore rule mistakes: allow read, write: if true;; the "start in test mode" rule if request.time < timestamp.date(...); rules whose only check is request.auth != null; and a top-level match /{document=**} with a broad allow.
Why it is dangerous
if true grants the request to anyone on the internet using only the public config in your web app. Rules are OR'ed: if any allow statement matches, the request is granted, so one open rule cannot be narrowed by stricter rules elsewhere. Test mode leaves everything open until the date, and when it expires the app breaks and people often push the date forward. request.auth != null only proves the caller has some account, and anyone can create one in seconds with your public config. Storage upload rules without size or content-type limits let users upload gigabytes you pay for, or HTML / SVG that runs script from your storage URL.
How to fix it
Limit access to the owner of each document:
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}For documents that store the owner in a field, compare request.auth.uid with resource.data.ownerId (and request.resource.data.ownerId on create). If data is meant to be public, allow reads only and keep writes closed.
What this checker looks for
This page runs firebase-launch-check, which reads
firestore.rules, storage.rules, database.rules.json, firebase.json and app code. The rules most relevant to this page:
| Rule | What it finds |
|---|---|
FLC001 | Rule allows access to everyone (if true / no condition) |
FLC002 | Test-mode rules (open to everyone until a date) |
FLC003 | Only check is "signed in" (request.auth != null) |
FLC004 | Recursive wildcard opens the whole database or bucket |
FLC005 | Users can set privileged fields on their own document |
FLC101 | Storage upload rule without authentication |
FLC102 | Storage upload without size or content-type limits |
Every finding has a rule id, a severity, file:line, the offending line (secrets masked),
why it matters and how to fix it. Run firebase-launch-check rules for the full list.