ci: replace PR_TOKEN with Token Exchange Service in release workflows#31670
Draft
tommasini wants to merge 2 commits into
Draft
ci: replace PR_TOKEN with Token Exchange Service in release workflows#31670tommasini wants to merge 2 commits into
tommasini wants to merge 2 commits into
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
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.
Description
Replaces the
PR_TOKENpersonal access token (Patroll-managed) with the DevSecOps Token Exchange Service (theMetaMask/github-tools/.github/actions/get-token@v1OIDC action) across the release-related workflows.Why: Patroll-rotated tokens have been unreliable (rotation job not running consistently), and a long-lived PAT is broader than needed. Token Exchange mints short-lived, least-privilege tokens on demand per workflow run.
What changed (all
PR_TOKENusages removed — 0 remain in the repo):commit-build-version.ymlworkflow_call(reusable)contents: write; dropped thePR_TOKENsecret inputcreate-release-pr.ymlworkflow_dispatch+workflow_callget-tokenstep (contents/pull_requests: write,members: read); replaced all token refs; removedgithub-token/PR_TOKENsecrets; deleted the dispatch-vs-call ternaryupdate-release-changelog.ymlpushcontents/pull_requests: write(nomembers: read— see note)publish-slack-release-testing-status.ymlschedule+workflow_dispatchcontents/pull_requests: readbuild-rc-auto.ymlpushPR_TOKEN; addedid-token: writeto caller jobrunway-production-builds.ymlworkflow_dispatchrunway-rc-builds.ymlworkflow_dispatchauto-create-release-pr.ymlcreategithub-token: ${{ secrets.PR_TOKEN }}members: readrationale: onlycreate-release-pr.ymlneeds org member read, because its native path runsgen:commits(generate-rc-commits.mjs), which resolves PR author → org team.update-release-changelog.ymlno longer generatescommits.csvandauto-changelog --autoCategorizesorts by Conventional Commit prefix, so it does not need it.Important
Depends on Token Exchange policies in
consensys-vertical-apps/token-exchange-service(policies/metamask/metamask-mobile.rego). Reusable workflows must match viajob_workflow_ref_match. These must be merged + deployed (push-acr-prod,deploy-prod) before this is functional. Also confirm themm-token-exchange-serviceapp has orgmembers: read. After a green release run, thePR_TOKENsecret can be revoked.Changelog
CHANGELOG entry: null
Related issues
Fixes: N/A
Manual testing steps
N/A — CI/release workflow changes. Validation happens once the Token Exchange policies are deployed: confirm
create-release-pr, RC builds (commit-build-version), changelog update, and the Slack status job each mint a token and complete successfully on a release branch run.Screenshots/Recordings
N/A
Pre-merge author checklist
Made with Cursor