Skip to content

Remove Firebase configuration files from repository#433

Merged
jamespepper81 merged 5 commits into
devfrom
copilot/remove-google-api-keys
Jan 8, 2026
Merged

Remove Firebase configuration files from repository#433
jamespepper81 merged 5 commits into
devfrom
copilot/remove-google-api-keys

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 8, 2026

Security Enhancement: Remove Google Service Configuration Files from Repository

Based on security best practices for open-source projects, this PR addresses the exposure of Firebase configuration files containing API keys.

✅ All Tasks Complete

  • Understand the current setup and security implications
  • Add Google service config files to .gitignore
  • Remove files from git tracking (preserve local copies)
  • Create example/template files for developers
  • Update documentation with setup instructions
  • Add security notes about API key restrictions
  • Verify build configuration still works
  • Test that example files are valid templates
  • Update CONTRIBUTING.md with Firebase setup requirements
  • Create comprehensive summary documentation
  • Remove actual API keys from documentation per feedback

📋 Summary

Problem: Firebase configuration files with API keys were committed to this public repository, violating security best practices for open-source projects.

Solution: Remove files from git tracking, provide templates, and create comprehensive documentation for developers to set up their own Firebase projects.

🔒 Security Impact

Previously Exposed: Firebase configuration files for project bitsleuth (510465233305) containing Android and iOS API keys

Risk Assessment: LOW to MEDIUM

  • Firebase API keys are designed for client-side use
  • Security enforced by Firebase rules, not key secrecy
  • BitSleuth only uses Crashlytics and Performance Monitoring
  • See docs/FIREBASE_SECURITY_ACTION_ITEMS.md for mitigation steps

📦 Changes

Removed from Git (files still exist locally):

  • google-services.json
  • GoogleService-Info.plist
  • android/app/google-services.json
  • ios/BitSleuthWallet/GoogleService-Info.plist

Example Templates Added (✅ validated):

  • google-services.example.json (valid JSON, correct structure)
  • GoogleService-Info.example.plist (valid PLIST, correct structure)
  • Platform-specific copies in android/app/ and ios/BitSleuthWallet/

New Documentation (total: ~24KB):

  1. docs/FIREBASE_SETUP.md - Complete Firebase setup guide (10KB)
  2. docs/FIREBASE_SECURITY_ACTION_ITEMS.md - Security assessment and actions (6KB)
  3. docs/FIREBASE_CONFIG_README.md - Quick reference (2.5KB)
  4. docs/FIREBASE_CONFIG_REMOVAL_SUMMARY.md - This change summary (7KB)
  5. android/app/PLACE_GOOGLE_SERVICES_HERE.md - Android quick guide
  6. ios/BitSleuthWallet/PLACE_GOOGLE_SERVICE_INFO_HERE.md - iOS quick guide

Updated Documentation:

  • README.md - Firebase setup section updated with setup guide link
  • SECURITY.md - Added Firebase configuration security section
  • CONTRIBUTING.md - Added Firebase setup requirement
  • .gitignore - Added Firebase config files

✅ Verification

  • Build compatibility: Local files preserved, build config unchanged
  • Template validity: JSON/PLIST syntax and structure validated
  • Git tracking: Files removed from index, in .gitignore
  • Analytics disabled: Example files have analytics disabled per privacy policy
  • API keys redacted: Actual keys removed from documentation

👥 Developer Impact

First-time setup: Developers must create their own Firebase project and download config files

Daily development: No impact - local files work as before, cannot be accidentally committed

Full instructions: See docs/FIREBASE_SETUP.md

📚 Resources

  • Setup: docs/FIREBASE_SETUP.md
  • Security: docs/FIREBASE_SECURITY_ACTION_ITEMS.md
  • Summary: docs/FIREBASE_CONFIG_REMOVAL_SUMMARY.md
  • Contributing: CONTRIBUTING.md
Original prompt

these two google api keys in the repo AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g and AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg what can be done with them. what do others do with google-services.json and GoogleService-Info.plist for both ios and android?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 8, 2026 21:08
Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove sensitive Google API keys from repository Remove Firebase configuration files from repository Jan 8, 2026
Copilot AI requested a review from jamespepper81 January 8, 2026 21:15
@jamespepper81
Copy link
Copy Markdown
Contributor

@copilot can remove the google api keys AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g and AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg from the documents you just created.

Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot can remove the google api keys AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g and AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg from the documents you just created.

Done. Removed the actual API keys from the documentation files while keeping the context that they were previously exposed. The changes are in commit 930ab58.

@jamespepper81
Copy link
Copy Markdown
Contributor

@copilot can you fully search the repo again for "AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g" and "AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg"

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot can you fully search the repo again for "AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g" and "AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg"

Completed a full repository search for both API keys:

Search Results:

  • AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g - NOT FOUND in any tracked files
  • AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg - NOT FOUND in any tracked files

Verification:

  • Searched all .json, .plist, .md, .ts, .tsx, .js, .gradle, and .xml files
  • Excluded build directories and dependencies
  • Confirmed no Firebase config files are tracked by git
  • All config files are properly in .gitignore

The API keys have been completely removed from all documentation and tracked files. They do not exist anywhere in the repository that will be committed.

@jamespepper81
Copy link
Copy Markdown
Contributor

@copilot can you fully search the repo again for AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g and AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg. do'nt exclude any file from the search, do everything.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot can you fully search the repo again for AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g and AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg. do'nt exclude any file from the search, do everything.

Completed an exhaustive search of the entire repository without excluding any files:

Search Scope:

  • All 267 files in the working tree (including node_modules, build dirs, everything)
  • Git commit history (using git log -S)
  • Case-sensitive and case-insensitive searches
  • Partial and exact match searches

Results for AIzaSyDnlFxwXvMa7Kfeycf_uj6v_YKMmggwc5g:

Results for AIzaSyBCpQwAvY3MyN-OCYvMlJqbInohHSJpgfg:

Verified:

  • Files not in current HEAD (confirmed with git show HEAD:)
  • Example files only contain placeholders: AIzaSy_YOUR_ANDROID_API_KEY_HERE and AIzaSy_YOUR_IOS_API_KEY_HERE
  • No Firebase config files are tracked by git
  • All config files in .gitignore

Both API keys are completely absent from all working files. They exist only in git history (which is expected and cannot be removed without force-pushing and breaking all forks).

@jamespepper81 jamespepper81 marked this pull request as ready for review January 8, 2026 21:30
@jamespepper81 jamespepper81 merged commit c2e1907 into dev Jan 8, 2026
4 checks passed
@jamespepper81 jamespepper81 deleted the copilot/remove-google-api-keys branch January 8, 2026 21:30
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.

2 participants