{"id":51118727,"url":"https://github.com/Perufitlife/firebase-security-skill","last_synced_at":"2026-06-25T00:01:25.991Z","repository":{"id":356752189,"uuid":"1233835561","full_name":"Perufitlife/firebase-security-skill","owner":"Perufitlife","description":"Open-source Firebase Firestore Rules auditor: detects 'match /{document=**} if true', expired test-mode rules, auth-without-ownership. Active probe sends anonymous GET to confirm leaks.","archived":false,"fork":false,"pushed_at":"2026-06-21T12:49:36.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T14:34:22.617Z","etag":null,"topics":["audit","auditor","cli","devsecops","firebase","firestore","google","leak","mit-license","nodejs","open-source","penetration-testing","scanner","security","security-audit","typescript","vulnerability"],"latest_commit_sha":null,"homepage":"https://perufitlife.github.io/supabase-security-skill/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Perufitlife.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://buy.stripe.com/6oUeVd1nqfj47yxbTscAo0e","https://perufitlife.github.io/supabase-security-skill/"]}},"created_at":"2026-05-09T12:23:20.000Z","updated_at":"2026-06-21T12:49:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Perufitlife/firebase-security-skill","commit_stats":null,"previous_names":["perufitlife/firebase-security-skill"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Perufitlife/firebase-security-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perufitlife%2Ffirebase-security-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perufitlife%2Ffirebase-security-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perufitlife%2Ffirebase-security-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perufitlife%2Ffirebase-security-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Perufitlife","download_url":"https://codeload.github.com/Perufitlife/firebase-security-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perufitlife%2Ffirebase-security-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34696912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit","auditor","cli","devsecops","firebase","firestore","google","leak","mit-license","nodejs","open-source","penetration-testing","scanner","security","security-audit","typescript","vulnerability"],"created_at":"2026-06-25T00:01:24.992Z","updated_at":"2026-06-25T00:01:25.963Z","avatar_url":"https://github.com/Perufitlife.png","language":"JavaScript","funding_links":["https://buy.stripe.com/6oUeVd1nqfj47yxbTscAo0e","https://perufitlife.github.io/supabase-security-skill/"],"categories":["BaaS \u0026 Databases"],"sub_categories":[],"readme":"# Firebase Firestore Rules Security Auditor\n\n\u003e 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.\n\n\u003e ▶ **Run it without installing anything →** [apify.com/renzomacar/firebase-security-auditor](https://apify.com/renzomacar/firebase-security-auditor) (paste your firestore.rules + optional project ID, get HTML report)\n\n\u003e ⚡ 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)\n\n\u003e 🔁 **Want this running on a cron?** [RLS Monitor](https://rls-monitor.vercel.app/) does weekly diff-based scans + email alerts when new findings appear — $29/mo, your keys never leave your CI.\n\u003e\n\u003e 📦 **Need all 5 BaaS stacks at once?** The [BaaS Security Pack](https://perufitlife.github.io/supabase-security-skill/pack.html) bundles every scanner + sample reports + fix-SQL libraries — one $99 download.\n\n\u003e 🪞 **Sister tool**: [aitells](https://aitells.vercel.app/) detects + rewrites AI fingerprints in your text (em-dashes, \"delve\", parallel bullets). Free detector + $19 lifetime rewriter at [/rewrite](https://aitells.vercel.app/rewrite).\n\n[![npm](https://img.shields.io/npm/v/firebase-security?color=red)](https://www.npmjs.com/package/firebase-security) ![license](https://img.shields.io/badge/license-MIT-green) ![node](https://img.shields.io/badge/node-%3E%3D18-blue)\n\n\u003e **Sister tools** for other BaaS platforms (same `--discover` flag, all MIT):\n\u003e [supabase-security](https://www.npmjs.com/package/supabase-security) · [pocketbase-security](https://www.npmjs.com/package/pocketbase-security) · [appwrite-security](https://www.npmjs.com/package/appwrite-security) · [nhost-security](https://www.npmjs.com/package/nhost-security) · [strapi-security](https://www.npmjs.com/package/strapi-security) · [directus-security](https://www.npmjs.com/package/directus-security) · [convex-security](https://www.npmjs.com/package/convex-security) · [hasura-security](https://www.npmjs.com/package/hasura-security) · [payload-security](https://www.npmjs.com/package/payload-security)\n\n## Why this exists\n\nFirebase Firestore rules are easy to get wrong, and the failure mode is the worst possible: silent + total. The patterns I see over and over:\n\n- **`match /{document=**} { allow read, write: if true; }`** — leftover from `firebase init`. Anyone with the project ID can dump every collection. Made HN multiple times.\n- **`request.time \u003c timestamp.date(2026, 6, 1)`** — Firebase generates this in test mode. Expires on a date but is wide-open BEFORE that date.\n- **`if request.auth != null`** without ownership check — same anti-pattern as PocketBase `@request.auth.id != \"\"`. Any anonymous-auth user can read/write everything.\n- **Read open + write closed catch-all** — devs lock writes but forget reads stay public.\n- **Storage `allow read: if true`** on user uploads — exposes private files (PII docs, payment proofs).\n\n## Install + run\n\nRun against a local rules file (no auth needed):\n\n```bash\nnpx firebase-security firestore.rules\n```\n\nWith active probe (sends anonymous GET to your project's REST endpoint):\n\n```bash\nnpx firebase-security firestore.rules --project-id my-firebase-project --html report.html\n```\n\nProbe-only mode (no rules file, just verify whether anonymous reads work against the deployed DB):\n\n```bash\nnpx firebase-security --project-id my-firebase-project --html report.html\n```\n\n## What it checks\n\n| # | Check | Severity |\n|---|---|---|\n| 1 | `match /{document=**}` with `if true` (the infamous wide-open pattern) | **CRITICAL** |\n| 2 | `if true` literal anywhere in rules | **CRITICAL** |\n| 3 | `if request.auth != null` without ownership check | HIGH |\n| 4 | Test-mode timestamp rule (open until expiry date) | HIGH |\n| 5 | Catch-all read open + write closed | MEDIUM |\n| 6 | Storage rules with open read on user uploads | HIGH |\n| 7 | Missing explicit default-deny block | INFO |\n\nEach finding ships with a fix snippet you paste back into `firestore.rules`.\n\n## Active probe\n\nThe probe sends an unauthenticated GET to:\n\n```\nhttps://firestore.googleapis.com/v1/projects/{project-id}/databases/(default)/documents\n```\n\nIf documents come back, the project's default DB is leaking and the finding is `confirmed: true` with document count + bytes returned + sample paths.\n\n`--no-probe` disables the network call.\n\n## How to find your project ID\n\nIn the Firebase console: **Project Settings → General → Project ID** (looks like `my-app-1a2b3` or whatever you named it).\n\nThe 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.\n\n## Output\n\n- **HTML report** — Tailwind + Chart.js, ~25KB self-contained. Top banner shows X of Y suspected leaks confirmed live.\n- **JSON** — full structured findings (default stdout if no `--html`).\n\n## License + source\n\nMIT. Open source: https://github.com/Perufitlife/firebase-security-skill\n\nFor the BaaS family, see:\n- Supabase: https://github.com/Perufitlife/supabase-security-skill\n- PocketBase: https://github.com/Perufitlife/pocketbase-security-skill\n- Appwrite: https://github.com/Perufitlife/appwrite-security-skill\n- Hasura/Nhost: https://github.com/Perufitlife/nhost-security-skill\n\n\n## Want it done for you?\n\nTwo productized services:\n\n- [**Vibe-code Security Review** — $199 / 48h](https://buy.stripe.com/bJe00jgik4EqdWV2iScAo0n) — I review your AI-generated code (Cursor / Claude / v0 / Bolt) and ship a PDF with fixes ranked by exploitability.\n- [**Sandbox-as-a-Service** — $499 / 48h](https://buy.stripe.com/aFa7sLc243Amf0Z5v4cAo0l) — custom partner integration sandbox built for your API.\n\n## Integration pattern reference\n\nSee [`rotatepilot-skyx-sandbox`](https://github.com/Perufitlife/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.\n\n## Sister AI text tools\n\nIf your team writes outreach, PR descriptions, or social posts with AI, the [aitells](https://aitells.vercel.app) ecosystem catches the fingerprints before they ship:\n\n- [`@perufitlife/aitells-mcp`](https://www.npmjs.com/package/@perufitlife/aitells-mcp) — MCP server for Claude Code / Cursor. `detect_ai_tells` + `humanize_text` as native tools.\n- [`Perufitlife/aitells-action`](https://github.com/Perufitlife/aitells-action) — GitHub Action that scans PR titles/bodies/commits for AI patterns. Posts friendly summary comment.\n- [aitells.vercel.app](https://aitells.vercel.app) — free detector + $19 lifetime humanizer (first 100 buyers)\n\n---\n\n📚 Part of [**Awesome Backend Security Auditors**](https://github.com/Perufitlife/awesome-backend-security) — the full collection of keyless active-probe auditors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerufitlife%2Ffirebase-security-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPerufitlife%2Ffirebase-security-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerufitlife%2Ffirebase-security-skill/lists"}