Your Firebase web config, apiKey included, is public by design: it ships in your JavaScript and anyone can read it. The only thing between that config and your users' data is your security rules, and AI tools often leave them in test mode or loosen them until the app "works". Here's how to check them in about ten minutes.
1. Find test-mode and allow-all rules
From your project folder:
grep -nE "if true|request.time <|\"\.(read|write)\": *true" firestore.rules storage.rules database.rules.json
Enter fullscreen mode
Exit fullscreen mode
Any hit is an open door. allow read, write: if request.time < timestamp.date(...) is the default test-mode rule: everything is public until that date, and when it passes the app breaks and someone "fixes" it with if true .
2. "Signed in" is not "allowed"
allow read, write: if request.auth != null; lets every user who signs up read and change every other user's documents.β¦