A command-line tool to audit Firestore security rules for potential vulnerabilities and best practices.
npm install -g firestore-security-auditorOr use it without installing:
npx firestore-security-auditor --helpfirestore-security-auditor [options]-p, --project <project>: Firestore project ID (required)-r, --rules-file <rulesFile>: Path to Firestore security rules file (optional)-v, --verbose: Enable verbose output (optional)
Audit rules by specifying a project and rules file:
firestore-security-auditor --project my-firebase-project --rules-file ./firestore.rulesAudit rules by fetching them directly from the project:
firestore-security-auditor --project my-firebase-projectEnable verbose output:
firestore-security-auditor --project my-firebase-project --verbose# Clone the repository
git clone https://github.com/yourusername/firestore-security-auditor.git
cd firestore-security-auditor
# Install dependencies
npm install
# Build the project
npm run buildnpm run dev: Run the CLI in development modenpm run build: Build the TypeScript codenpm run lint: Lint the codenpm test: Run tests
MIT