firebase-security-rules-auditor

Audits Firestore security rules against a penetration-testing checklist and returns a scored JSON report.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-security-rules-auditor-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firebase-security-rules-auditor
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/antigravity/plugins/firebase/skills/firebase_security_rules_auditor
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-security-rules-auditor-ferrarifankid04

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Firestore security rules often look correct but contain subtle holes—update bypasses, self-assigned roles, missing type checks—that expose data or allow privilege escalation. This Skill systematically audits your rules from an attacker's perspective so vulnerabilities are caught before deployment. ## Core Features & Use Cases - Red Team Audit Checklist: Evaluates rules against six mandatory checks including update bypasses, authority source validation, business logic alignment, storage abuse limits, type safety, and field-level versus identity-level security. - Scored Findings: Assigns a 1-5 security score (Critical to Secure) and returns structured JSON findings with severity, issue description, and concrete fix recommendations. - Admin Bootstrapping Awareness: Correctly handles hardcoded admin email patterns without penalizing them when email verification and escalation safeguards are in place. - Use Case: After generating or updating Firestore rules for a collaboration app, run this audit to discover that collaborators cannot actually read shared data, or that any authenticated user can update another user's document fields. ## Quick Start Audit my Firestore security rules in firestore.rules and report any vulnerabilities with a security score and recommended fixes.

Frequently Asked Questions about firebase-security-rules-auditor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Firestore security rules for vulnerabilities?

Run this audit against your Firestore rules file to check for update bypasses, insecure authority sources, missing type checks, and absent size limits. It returns a JSON report with a 1-5 score and severity-ranked findings with fix recommendations.

What are common Firestore security rules mistakes?

Common mistakes include trusting user-provided role fields, allowing create-then-update bypasses into invalid states, missing string length limits enabling DoS, and using hasOnly() or diff() without ownership checks. The audit checklist targets each of these patterns.

Does a hardcoded admin email in Firestore rules count as a vulnerability?

Not necessarily. A single hardcoded admin email is acceptable if email_verified is also checked and the implementation prevents additional admins from self-assigning or escalating privileges. The audit does not penalize this pattern when those conditions hold.

Why can any authenticated user update my Firestore documents?

This happens when rules restrict which fields can change using hasOnly() or diff() but omit an ownership check like resource.data.uid == request.auth.uid. Field-level restrictions alone do not control who can perform the update.

What output format does the Firestore rules audit produce?

The audit returns JSON containing a score from 1 to 5, an overall summary, and a findings array. Each finding lists the checklist item, severity level (critical, major, moderate, or minor), the issue description, and a recommended fix.