Your Firebase API key isn't a secret
This surprises a lot of people. Firebase's API key docs explain that the key in your web config only identifies your project. It doesn't decide who can read data: that's the job of Firebase Security Rules, together with App Check. So seeing apiKey in your page source is normal.
Two things are worth doing with it anyway. Firebase applies API restrictions to the keys it creates, but you can also restrict which websites may use a browser key, in Google Cloud under APIs & Services → Credentials. Without that, other sites can use your key and spend your quotas.
And some Firebase credentials really are secret. The Firebase security checklist names service account private keys and FCM server keys. Those must never be in your website.
Security rules decide everything
Firestore, the Realtime Database and Cloud Storage each have their own rules. A rule like allow read, write: if true; opens the data to the whole internet, and Firebase's guide to insecure rules says never to use it in production. Rules that only check "is someone signed in" are better, but still let any signed-in user read everyone's data. The fix is rules that match the data's owner.
What Securick checks
From your public URL (Free runs 46 tests, Pro 130):
- #7 Google/Firebase API key without restrictions Free
- #42 Firebase service account exposed Pro
- #8 Private key exposed Free
- #10 Secret values in public env variables Free
- #13 JavaScript source maps public Free
- #19 HTTP redirects to HTTPS Free
- #23 Content-Security-Policy present Free
On a domain you verify, the Deep scan reads with no login, using only what your web app already publishes, and reports what was open. It never writes:
- #61 Firebase Realtime Database not open to read Deep
- #62 Firestore not open to read Deep
- #63 Firebase Storage not open to list Deep
- #96 Data isolation between users Deep
- #97 User files and profiles isolated Deep
What this isn't: we don't read or evaluate your rules files, and we don't test whether data can be written. We test whether data can be read or listed without signing in, and on Deep, whether one test user can see another's data. Use the Rules Playground or the emulator, as Firebase recommends, to test your rules in detail.
A quick Firebase check before launch
- No service account JSON or FCM server key anywhere in your website's code or files.
- Your browser API key restricted to your own domains in Google Cloud.
- No
if truerules left in Firestore, the Realtime Database or Storage. - Rules that compare the signed-in user's id with the data's owner, not just "signed in".
- App Check considered for the services your app uses.
What a finding looks like
Anyone can read documents in your Firestore
Fix prompt to paste into your builder
Rewrite the Firestore security rules for the users and orders collections so reads require a signed-in user and only match documents that user owns (for example: allow read: if request.auth != null && request.auth.uid == resource.data.ownerId). Remove any rule that allows read or write if true.
Free, Pro and Deep
Free
46 tests from your public URL, 2 scans a day, no sign-up. Every finding with proof.
Pro · $10 one time
30 scans within 30 days: all 130 tests, with a fix prompt for every finding and PDF reports.
Deep · part of Pro
17 more tests (147 in total) that touch your database and signed-in users, only on a domain you verify.
Questions
Should I hide my Firebase API key?
You can't, and you don't need to: it's sent to every browser by design. Protect your data with security rules and App Check, and restrict which websites may use the key.
Do you test Firestore write rules?
No. We never write to your project. We test whether data can be read or listed without signing in, and on Deep, whether users can see each other's data.
My app uses Firebase Authentication. Is that enough?
Authentication proves who someone is. Security rules decide what they may read. If the rules only check that someone is signed in, every user can read every other user's data.
Does the scan work with Firebase Hosting?
Yes. We scan whatever public address you give us, including web.app and firebaseapp.com addresses and custom domains.