A command-line tool to audit Firestore security rules for potential vulnerabilities and best practices.
npm install -g firestore-security-auditor
Or use it without installing:
npx firestore-security-auditor --help
firestore-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.rules
Audit rules by fetching them directly from the project:
firestore-security-auditor --project my-firebase-project
Enable 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 build
npm run dev
: Run the CLI in development modenpm run build
: Build the TypeScript codenpm run lint
: Lint the codenpm test
: Run tests
MIT