Firebase test mode rules: how to tell if your database is open

When you create a Firebase database in test mode, the rules let anyone read and write it. AI tools often pick test mode to get things working, and the rules stay that way after launch.

What test mode looks like

Open Firebase console → Firestore → Rules. If you see something like this, your database is open to the internet:

allow read, write: if true;
// or
allow read, write: if request.time < timestamp.date(2026, 11, 1);

Safer rules

Require a signed-in user and limit each document to its owner:

rules_version = '2';
service cloud.firestore {
  match /databases/{db}/documents {
    match /users/{uid}/{doc=**} {
      allow read, write: if request.auth != null && request.auth.uid == uid;
    }
  }
}

Realtime Database

The Realtime Database has its own rules under Realtime Database → Rules. ".read": true or ".write": true at the top level means the whole database is public. You can test it yourself by opening https://YOUR-PROJECT.firebaseio.com/.json in a browser: if you see data, so can everyone.

Check it automatically

SafeCheck reads your Firebase config from your site, repo or Android app and tests whether the database answers without logging in.

Check your app now. Free, no signup, under a minute.

Scan your app

More guides: Is my Lovable app secure? A 5-minute check · How to check if Supabase RLS is enabled (and fix it) · How to check if your website leaks API keys · OpenAI API key exposed in your frontend? Do this now · Security checklist for apps built with Bolt, Cursor, v0 and Replit · Is this Claude skill or MCP server safe to install? A 5-minute check