Firestore security rules checker

Paste your firestore.rules or storage.rules, or drop your project folder, to find rules that let anyone read or write your data.

Run the check

Drop a project folder or files here

node_modules, .git, virtualenvs and build folders are skipped. Limit 25 MB / 5,000 files.

The Python engine (Pyodide, a few MB, cached by your browser) loads when you start.

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:

RuleWhat it finds
FLC001Rule allows access to everyone (if true / no condition)
FLC002Test-mode rules (open to everyone until a date)
FLC003Only check is "signed in" (request.auth != null)
FLC004Recursive wildcard opens the whole database or bucket
FLC005Users can set privileged fields on their own document
FLC101Storage upload rule without authentication
FLC102Storage 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.

FAQ

Does it check Storage rules too?

Yes. storage.rules is checked for uploads without authentication and uploads without size or content-type limits, plus the same open / test-mode / wildcard patterns.

What if my rules only live in the Firebase console?

Then they cannot be checked. When the code uses a Firebase service but no rules file is in the project, the checker reports it (FLC404). Export the rules into the repo so they can be reviewed and versioned.

Are my files uploaded anywhere?

No. The checker is Python running inside your browser tab (Pyodide, WebAssembly). Your files are read with the browser's File API and written into an in-memory file system that exists only in this tab. Your files are never sent anywhere. The only network requests load the Python runtime and the checker code, plus Google Analytics page-view counting, which never sees your files. You can disconnect from the internet after the engine has loaded and the scan still works.

Is a clean report a guarantee?

No. It is a static check for known patterns, not a penetration test. A clean report means none of these patterns were found, nothing more.

Can I run the same check on my machine or in CI?

Yes. Every checker on this site is an open-source command-line tool (MIT licence, Python 3.10+ standard library only). The results here are the same as `scan --json` on the command line, except for checks that need git (whether a file is committed or ignored), which cannot run in a browser.