You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CRITICAL: Rotate exposed google_api_key in markets repo #56
Search codebase for exposed Google API key (not found in current working tree)
Update .gitignore to prevent future accidental commits of secret files
Document manual steps required (key rotation, git history scrubbing)
Findings
The Google API key is not present in the current working tree. Based on the stack (Firebase Auth, FCM, Firebase Realtime DB), the exposure almost certainly came from a google-services.json (Android) or GoogleService-Info.plist (iOS) file committed to git history at some point.
Distribute secrets via EAS Secrets — After rotation, store the new config files using eas secret:push or CI environment variables rather than committing them.
Close the secret scanning alert — Once the key is rotated and history is clean, close the alert in the security tab.
✅ .gitignore hardened with patterns for .env*, google-services.json, GoogleService-Info.plist, firebase-adminsdk*.json, *.pem, *.key, etc.
✅ Git history scrubbed via git filter-repo --replace-text — the leaked key value AIzaSyCBcl67UrXDeGOfSSndcEmph02dwcS-9oI has been replaced with REDACTED_GOOGLE_API_KEY across all branches and force-pushed.
Note: All branches were rewritten. Anyone with an existing local clone will need to re-clone or run git fetch && git reset --hard origin/<branch>. Branch protection on main was temporarily relaxed for the force-push and has been restored to its prior state (enforce_admins=true, allow_force_pushes=false, required checks SonarCloud + claude-code / claude).
Activity
claude commentedon Apr 6, 2026
Claude finished @don-petry's task in 1m 47s —— View job •
claude/issue-56-20260406-0127• Create PR ➔Security Remediation: Exposed Google API Key
.gitignoreto prevent future accidental commits of secret filesFindings
The Google API key is not present in the current working tree. Based on the stack (Firebase Auth, FCM, Firebase Realtime DB), the exposure almost certainly came from a
google-services.json(Android) orGoogleService-Info.plist(iOS) file committed to git history at some point.What was done
Updated
.gitignoreto exclude:google-services.json— Android Firebase config (containsgoogle_api_key)GoogleService-Info.plist— iOS Firebase config.env/.env.*files — general secret protectionnode_modules/, OS filesManual steps still required (cannot be automated)
These must be completed by a human:
Rotate the key NOW — Go to Google Cloud Console → Credentials, find the exposed key, and click "Regenerate" or delete and create a new one.
Review the secret scanning alert — Visit the markets security tab to identify the exact commit and file.
Scrub git history — If the key is in commit history, run:
Or use BFG Repo Cleaner as an alternative.
Distribute secrets via EAS Secrets — After rotation, store the new config files using
eas secret:pushor CI environment variables rather than committing them.Close the secret scanning alert — Once the key is rotated and history is clean, close the alert in the security tab.
security: add secret-file exclusions to .gitignore
security: add secret-file exclusions to .gitignore
security: harden .gitignore against secret-file commits
don-petry commentedon Apr 7, 2026
All remediation steps complete:
revoked.gitignorehardened with patterns for.env*,google-services.json,GoogleService-Info.plist,firebase-adminsdk*.json,*.pem,*.key, etc.git filter-repo --replace-text— the leaked key valueAIzaSyCBcl67UrXDeGOfSSndcEmph02dwcS-9oIhas been replaced withREDACTED_GOOGLE_API_KEYacross all branches and force-pushed.Note: All branches were rewritten. Anyone with an existing local clone will need to re-clone or run
git fetch && git reset --hard origin/<branch>. Branch protection onmainwas temporarily relaxed for the force-push and has been restored to its prior state (enforce_admins=true,allow_force_pushes=false, required checksSonarCloud+claude-code / claude).security: harden .gitignore against secret-file commits