Repository navigation
fix(ci): stop using the GCP service account key - #773
Merged
Merged
Conversation
CI decoded GCP_CREDENTIALS_{STAGING,PRODUCTION} into credentials.json and
exported GOOGLE_APPLICATION_CREDENTIALS. The only consumer is
platform.generate_signed_url, and every test that reaches it unmocked is
skipped (GCS_TEST_SLIDES_REMOVED_REASON), so no running test needs the key.
Remove the secret declarations and the setup step from the reusable test
workflows, the secret pass-through from their callers (including the paused
stress workflow), and the mentions in CLAUDE.md, .github/CLAUDE.md and
SPEC-BUILD-CHAIN-CICD-SERVICE.md.
If the GCS tests are re-enabled, use Workload Identity Federation with
service account impersonation and IAM signBlob instead of a key.
|
OX Security reviewed this pull request — nothing to fix.
Branch |
olivermeyer
reviewed
Nov 10, 2026
olivermeyer
left a comment
Collaborator
There was a problem hiding this comment.
Just to be on the safe side, I'd suggest removing the skip:test:long_running and adding the enable:test:very_long_running to run the full test suite (will require closing + opening the PR again).
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
olivermeyer
approved these changes
Nov 11, 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.



Why
CI decoded
GCP_CREDENTIALS_{STAGING,PRODUCTION}(a base64 service-account JSON key) intocredentials.jsonand exportedGOOGLE_APPLICATION_CREDENTIALS. A long-lived key in CI is a liability, and nothing that runs in CI uses it.The only consumer of Application Default Credentials in the SDK is
platform.generate_signed_url(src/aignostics/platform/_utils.py). Every test that reaches it without a mock has@pytest.mark.skip(reason=GCS_TEST_SLIDES_REMOVED_REASON)(the test slides were removed from the bucket). Bucket uploads use HMAC keys from the platform, and IDC downloads use anonymouss5cmd --no-sign-request.What
_test.yml,_scheduled-test-{hourly,daily,stress}.yml: remove theGCP_CREDENTIALS_*secret declarations and the "Set up GCP credentials for bucket access" step.ci-cd.yml,scheduled-testing-{staging,production}-{hourly,daily}.yml,stress-testing-staging.yml.paused: remove the secret pass-through. The declarations and callers change together. Otherwise the scheduled workflows fail at startup: a caller that leaves out arequired: truesecret fails, and so does a caller that passes a secret its reusable workflow doesn't declare.CLAUDE.md,.github/CLAUDE.md,specifications/SPEC-BUILD-CHAIN-CICD-SERVICE.md: remove the mentions.No Python source or tests changed.
Verification
actionlint .github/workflows/*.yml: the same 9 findings onmainand on this branch, all from before this change (runner labels,github.head_ref,commit_messageinput). This change adds none.GCP_CREDENTIALS_STAGINGback into a caller, and actionlint reportedsecret "GCP_CREDENTIALS_STAGING" is not defined in ... reusable workflow(exit 1). After reverting, it exited 0.GCP_CREDENTIALS,credentials.jsonandGOOGLE_APPLICATION_CREDENTIALSfinds nothing left.make lintpasses.ci-cd.ymlgreen on this PRscheduled-testing-staging-hourlyand-dailydispatched on this branch and greenAfter merge
maingo green.GCP_CREDENTIALS_STAGINGandGCP_CREDENTIALS_PRODUCTION.If the GCS tests are ever re-enabled, use Workload Identity Federation with service account impersonation and IAM
signBlob, not a key.SDLC
The change edits
SPEC-BUILD-CHAIN-CICD-SERVICE.mdand needs the Software Item Spec approval: Engineer, then Engineering Tech Lead.