Firebase Firestore Rules Security Auditor

June 21, 2026 · View on GitHub

Detect the infamous Firebase data-leak patterns (match /{document=**} { allow read, write: if true; }, expired test-mode rules, auth-without-ownership) in any firestore.rules file. Optional active probe sends an anonymous GET to the Firestore REST endpoint to PROVE the leak with real data.

Run it without installing anything → apify.com/renzomacar/firebase-security-auditor (paste your firestore.rules + optional project ID, get HTML report)

⚡ Want me to run it for you and send back a written report? $99, 24h delivery → https://perufitlife.github.io/supabase-security-skill/ (one landing covers all five — Supabase, PocketBase, Appwrite, Hasura, Firebase)

🔁 Want this running on a cron? RLS Monitor does weekly diff-based scans + email alerts when new findings appear — $29/mo, your keys never leave your CI.

📦 Need all 5 BaaS stacks at once? The BaaS Security Pack bundles every scanner + sample reports + fix-SQL libraries — one $99 download.

🪞 Sister tool: aitells detects + rewrites AI fingerprints in your text (em-dashes, "delve", parallel bullets). Free detector + $19 lifetime rewriter at /rewrite.

npm license node

Sister tools for other BaaS platforms (same --discover flag, all MIT): supabase-security · pocketbase-security · appwrite-security · nhost-security · strapi-security · directus-security · convex-security · hasura-security · payload-security

Why this exists

Firebase Firestore rules are easy to get wrong, and the failure mode is the worst possible: silent + total. The patterns I see over and over:

  • match /{document=**} { allow read, write: if true; } — leftover from firebase init. Anyone with the project ID can dump every collection. Made HN multiple times.
  • request.time < timestamp.date(2026, 6, 1) — Firebase generates this in test mode. Expires on a date but is wide-open BEFORE that date.
  • if request.auth != null without ownership check — same anti-pattern as PocketBase @request.auth.id != "". Any anonymous-auth user can read/write everything.
  • Read open + write closed catch-all — devs lock writes but forget reads stay public.
  • Storage allow read: if true on user uploads — exposes private files (PII docs, payment proofs).

Install + run

Run against a local rules file (no auth needed):

npx firebase-security firestore.rules

With active probe (sends anonymous GET to your project's REST endpoint):

npx firebase-security firestore.rules --project-id my-firebase-project --html report.html

Probe-only mode (no rules file, just verify whether anonymous reads work against the deployed DB):

npx firebase-security --project-id my-firebase-project --html report.html

What it checks

#CheckSeverity
1match /{document=**} with if true (the infamous wide-open pattern)CRITICAL
2if true literal anywhere in rulesCRITICAL
3if request.auth != null without ownership checkHIGH
4Test-mode timestamp rule (open until expiry date)HIGH
5Catch-all read open + write closedMEDIUM
6Storage rules with open read on user uploadsHIGH
7Missing explicit default-deny blockINFO

Each finding ships with a fix snippet you paste back into firestore.rules.

Active probe

The probe sends an unauthenticated GET to:

https://firestore.googleapis.com/v1/projects/{project-id}/databases/(default)/documents

If documents come back, the project's default DB is leaking and the finding is confirmed: true with document count + bytes returned + sample paths.

--no-probe disables the network call.

How to find your project ID

In the Firebase console: Project Settings → General → Project ID (looks like my-app-1a2b3 or whatever you named it).

The probe only sends an unauthenticated GET — same thing any random visitor with your project ID could send. We don't need (or want) your service account key.

Output

  • HTML report — Tailwind + Chart.js, ~25KB self-contained. Top banner shows X of Y suspected leaks confirmed live.
  • JSON — full structured findings (default stdout if no --html).

License + source

MIT. Open source: https://github.com/Perufitlife/firebase-security-skill

For the BaaS family, see:

Want it done for you?

Two productized services:

Integration pattern reference

See rotatepilot-skyx-sandbox for a live demo of how a partner consumes one of our public REST APIs in a single static page — built 12-may-2026 in response to an aviation-platform partnership inbound. Same JSON-contract / CORS / edge-served approach we use for firebase-security integrations.

Sister AI text tools

If your team writes outreach, PR descriptions, or social posts with AI, the aitells ecosystem catches the fingerprints before they ship:


📚 Part of Awesome Backend Security Auditors — the full collection of keyless active-probe auditors.