r/Firebase • u/KaanKaya17 • 4h ago
Security Free CLI that tests your Firestore / Realtime DB / Storage rules with two real test users
allow read: if request.auth != null is the classic one: it looks protected, but every signed-in user (anonymous accounts included) can read everyone's data.
accessprobe checks your rules by attacking them:
- it creates two test accounts, which delete themselves at the end;
- user A writes a document, node or file, then user B and an anonymous visitor try to read, list, modify, take over and delete it, and to create one in A's name;
- Realtime Database: if your rules only live in the console, it reads the paths from your
getReference().child()code. It can also check whether anyone can list every entry under a node, such as backup codes or user ids; allow read: if trueis reported as public by design, not as a leak;- it gives a fix (Security Rules) for each finding.
cd your-app
npx accessprobe # config from google-services.json / firebaseConfig
npx accessprobe --database-rules database.rules.json # rules exported from the consoleReal-world check: on a multiplayer Android game it found that any player could overwrite another player's online status and read and overwrite their invites. The rules fix was verified against all 25 of the game's own read/write flows in the Emulator Suite before deploying.
MIT, zero dependencies, runs locally: https://github.com/KaanKaya17/accessprobe
Only test projects you own.