Firebase rules open to the public: how to tell and how to fix
Spot open Realtime Database, Firestore, and Storage rules, and lock them down with auth-based rules.
Check your live site
Run the free ShipLatch scan on your own site without leaving this page.
Uses 1 of your 3 free scans today; a site scanned in the last 24 hours answers from that scan. Passive and read-only: we only look at what any browser can see. Only check sites you own or may test.
What the free scan checks
- Leaked keys in your live JavaScript (AI, payment and cloud keys), including a Supabase
service_rolekey - Files that should never be public, like
/.envand/.git - Supabase and Firebase secrets in the browser: an
sb_secret_key, a Supabase access token or a Firebase service-account file - HTTPS and security headers (CSP, HSTS, clickjacking protection)
It only reads what any visitor's browser can see. It doesn't log in, read your tables or check App Check.
Classic Firebase footgun: rules that allow anyone to read or write. The Tea app's early breach was described as a Firebase database leak from broken authentication/authorization (Barracuda summary).
Dangerous patterns
// Realtime Database — never ship this
{ "rules": { ".read": true, ".write": true } }
// Firestore — equally bad
allow read, write: if true;
Safer baseline
// Realtime Database
{ "rules": {
"users": {
"$uid": {
".read": "auth != null && auth.uid == $uid",
".write": "auth != null && auth.uid == $uid"
}
}
} }
// Firestore
allow read, write: if request.auth != null
&& request.auth.uid == resource.data.ownerId;
Test with the Rules Playground and from a logged-out browser.
Rewrite Firebase security rules so no collection or path is world-readable or world-writable. Require request.auth != null (or auth != null for RTDB) and restrict each user to their own data. Show me the full rules file.
Related: Supabase RLS · Lovable security
Scan your app free
Paste your URL. ShipLatch checks for leaked keys, exposed /.env and /.git, and flags Supabase/Firebase so you know what to lock down. The free scan finds the issues; the $29 Fix Pack gives you fix prompts written for your app and re-scans that prove each fix worked.
Want the whole pre-launch process in one place? See what's inside App Security for Vibe Coders, our $9 PDF playbook, or go straight to checkout.