Repository navigation
ci: remove public-artifact secret scan from mobile release workflows - #8908
Merged
Merged
Conversation
The variable-like-token heuristic in scan-public-artifact-secrets.py false-positives on every mobile build: Firebase Auth SDK error constants (ERROR_INVALID_CREDENTIAL, INVALID_LOGIN_CREDENTIALS, MISSING_IOS_APP_TOKEN, INVALID_PASSWORD, API_KEY) compiled into the statically linked Runner executable and P12 in the dSYM Symbols/*.symbols files all match the denied_name_patterns in client_env_policy.yaml. The .framework/.xcframework carve-out from #8741 never covered the main binary or top-level Symbols/. This is the second time the scanner has broken the Codemagic mobile release on SDK constant strings (see revert 7123930); PR #8773 re-landed the wiring hours after that revert. The mobile build injects no server env values, so scanning compiled Mach-O output for ALL-CAPS env-var-shaped names yields only noise. Removes the six scan invocations (and the AAB_ARTIFACTS find lines that existed only to feed them) from the iOS/Android prod and shorebird-patch workflows. The scanner script, its tests, and the desktop release guard (which only requires the file to exist) are untouched.
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.
Summary
Removes the six
scan-public-artifact-secrets.pyinvocations (and theAAB_ARTIFACTSfind lines that existed only to feed them) from the iOS/Android prod and shorebird-patch workflows incodemagic.yaml. The scanner script, its tests,client_env_policy.yaml, and the desktop release guard are untouched.Why
Every prod mobile build is currently failing on false positives. The variable-like-token heuristic greps ALL-CAPS tokens out of compiled artifacts and matches them against
denied_name_patterns— and the flagged tokens are all Firebase Auth SDK error constants baked into the statically linkedRunnerexecutable, plusP12in the dSYMSymbols/*.symbolsfiles:ERROR_INVALID_CREDENTIAL,MISSING_APP_CREDENTIAL,INVALID_LOGIN_CREDENTIALS,MISSING_MFA_PENDING_CREDENTIAL,INVALID_MFA_PENDING_CREDENTIAL→(^|_)CREDENTIALS?($|_)ERROR_CUSTOM_TOKEN_MISMATCH,ERROR_INVALID_CUSTOM_TOKEN,MISSING_IOS_APP_TOKEN→(^|_)TOKEN($|_)INVALID_PASSWORD→(^|_)PASSWORD($|_),API_KEY→(^|_)API_KEY($|_),P12→(^|_)P12($|_)The
.framework/.xcframeworkcarve-out from #8741 never covered the main binary or the top-levelSymbols/directory.This is the second time this scan has broken the mobile release on SDK constant strings (first:
BatteryWidget.appex, reverted in 7123930; re-landed hours later by #8773). The mobile build steps inject no server env values into the bundle, so scanning compiled Mach-O output for env-var-shaped names is noise by construction — the scanner's real protection (the check for actual CI secret values) never fired.cc @Git-on-my-level — if this scan is re-landed a third time, it needs to exclude compiled executables and symbol files from the name-pattern heuristic first (the exact-name and secret-value checks can safely keep running on binaries).
Validation
python3 .github/scripts/check-release-process-guards.pypasses (the guard requiresscripts/scan-public-artifact-secrets.pyto exist; it still does)codemagic.yamlparses as valid YAML; zero remaining scanner references; no danglingAAB_ARTIFACTSuses🤖 Generated with Claude Code