Skip to content

fix(security): Firestore access control + .gitignore hardening - #45

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/vulnerability-findings-management-843c
Draft

fix(security): Firestore access control + .gitignore hardening#45
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/vulnerability-findings-management-843c

Conversation

@cursor

@cursor cursor Bot commented Jun 24, 2026

Copy link
Copy Markdown

Security Fixes

Two vulnerability fixes identified during the daily security scan (run bc-7316371d-d019-4656-b358-210f8d8c3ad1).

1. Firestore rules: restrict sensitive collection reads to admin-only

Finding: The config/weirdness, event_logs, and security_reports Firestore collections allowed read access to any authenticated user (isAuthenticated()). Since Firebase Auth with Google Sign-In accepts any Google account, this exposed:

  • RTSP camera credentials (URL, username, password) stored in config/weirdness — enabling unauthorized live video access to property surveillance cameras
  • Security event history (theft attempts, break-ins, AI analysis) — enabling physical reconnaissance

Fix: Changed all three collections from allow read: if isAuthenticated() to allow read: if isAdmin().

2. Root .gitignore: add .env exclusion patterns

Finding: The root .gitignore lacked .env and .env.* patterns, risking accidental commit of secrets from any directory in the monorepo.

Fix: Added .env, .env.*, .env.local, and .env.production patterns to the root .gitignore.

Open in Web View Automation 

cursoragent and others added 2 commits June 24, 2026 09:36
…ollections

The config/weirdness, event_logs, and security_reports collections
previously allowed read access to any authenticated user (isAuthenticated()).
Since Firebase Auth accepts any Google account, this exposed RTSP camera
credentials and security event history to unauthorized users.

Changed all three collections from 'allow read: if isAuthenticated()'
to 'allow read: if isAdmin()' to enforce proper authorization.

Co-authored-by: CARBComplianceApp <CARBComplianceApp@users.noreply.github.com>
The root .gitignore was missing .env, .env.*, .env.local, and
.env.production patterns, risking accidental commit of secrets
from any directory in the monorepo. The the-unit/api/.gitignore
already had these patterns, but the root did not.

Co-authored-by: CARBComplianceApp <CARBComplianceApp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant