Draft
security: remove committed service-account credential and harden secret hygiene#5
Conversation
… root google-services.json
Copilot
AI
changed the title
[WIP] Improve secret handling and reduce risk of committed credentials
security: remove committed service-account credential and harden secret hygiene
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root-level
google-services.jsoncontained a Firebase Admin SDK service-account private key and was tracked in git. This cleans it up and adds guardrails to prevent recurrence.Changes
google-services.json(root) — service-account credential ("type": "service_account"withprivate_key,client_email). The legitimate Android client config atandroid/app/google-services.jsonis unaffected..gitignore— added explicit block patterns for server-side credential files:.env/.env.*lines;!.env.exampleexception preserved..env.example— placeholder for all fourEXPO_PUBLIC_*vars referenced inapp.config.js, with an explicit comment thatEXPO_PUBLIC_*values are client-bundled and must not carry private server secrets.SECRETS.md— concise reference covering: what never to commit,EXPO_PUBLIC_*vs true secrets distinction, local dev setup, EAS/CI secret injection, and a reminder to rotate any previously exposed credentials.Original prompt
Prepare a pull request in
Shambez/SimbaGlobal_AIto improve secret handling and reduce the risk of committed credentials.Make these exact changes:
Tighten
.gitignore.envand.env.*while still allowing.env.example.google-services.jsonat repo rootservice-account*.jsonfirebase-admin*.json*.p8*.mobileprovision*.pem*.key*.cerAdd
.env.exampleEXPO_PUBLIC_APP_ENVEXPO_PUBLIC_API_URLEXPO_PUBLIC_OPENAI_PROJECT_IDEXPO_PUBLIC_PICOVOICE_ACCESS_KEYEXPO_PUBLIC_*variables are bundled into the client and must not contain private server secrets.Remove dangerous tracked secret file(s)
google-services.jsonif present and if it contains service-account/private-key style credentials rather than Android client config.android/app/google-services.jsonunless clearly unsafe.Add a short
SECRETS.mdsetup guideEXPO_PUBLIC_*) and true secrets.Implementation notes:
google-services.json, update them so the repo remains coherent.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: help secure and hide my secrets
Assistant: Yes — you should treat this repo as potentially exposed and rotate secrets now.
What I found:
google-services.json, and the version I inspected contains service-account style fields likeprivate_key,client_email, andclient_id. That is a real secret pattern, not something that should live in a public repo..gitignoreexplicitly allows Firebase config files:!android/app/google-services.json!GoogleService-Info.plist!ios/**/GoogleService-Info.plistEXPO_PUBLIC_API_URLEXPO_PUBLIC_OPENAI_PROJECT_IDEXPO_PUBLIC_PICOVOICE_ACCESS_KEYImmediate actions
google-services.json.Important distinction
Some files are okay to commit:
android/app/google-services.jsonfor Firebase client app config is often okayGoogleService-Info.plistis often okayBut the file you have at the repo root looks like a server/service account credential, which is not okay to commit.
Recommended repo changes
google-services.jsongoogle-services.jsonat repo rootservice-account*.jsonfirebase-admin*.json.env.local,.env.production, etc..env.exampleSafer pattern for this Expo app
Use:
EXPO_PUBLIC_*only for values safe to expose to the clientDo not put these in the mobile app
Your current config looks mostly fine here
app.config.jsis already using env vars instead of hardcoding keys, which is the right direction.What I can do next
I can help you clean this up in the repo by preparing exact changes:
.gitignore.env.exampleSECRETS.mdsetup guideIf you want, I can make those edits for
Shambez/SimbaGlobal_AIand open...This pull request was created from Copilot chat.