ci(dependabot): approve and merge updates via github-sts - #195
Merged
Conversation
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Mint a short-lived App token via github-sts (policy: dependabot, narrowed to the dependabot[bot] actor and this workflow) for the approve and merge steps, and drop the built-in token to read scopes. workflow_call consumers need their own policy plus an id-token: write grant when they bump their pin.
This was referenced Aug 25, 2026
brendanjryan
pushed a commit
to tempoxyz/mpp-rs
that referenced
this pull request
Aug 25, 2026
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Bump the shared tempoxyz/mpp-tools dependabot reusable workflow to the revision that mints a short-lived App token via the github-sts action, grant id-token: write in place of the old write scopes, and add the trust policy the mint checks against. Follow-up to tempoxyz/mpp-tools#195.
sds
added a commit
to tempoxyz/mpp-go
that referenced
this pull request
Aug 25, 2026
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Bump the shared tempoxyz/mpp-tools dependabot reusable workflow to the revision that mints a short-lived App token via the github-sts action, grant id-token: write in place of the old write scopes, and add the trust policy the mint checks against. Follow-up to tempoxyz/mpp-tools#195.
sds
added a commit
to tempoxyz/pympp
that referenced
this pull request
Aug 25, 2026
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Bump the shared tempoxyz/mpp-tools dependabot reusable workflow to the revision that mints a short-lived App token via the github-sts action, grant id-token: write in place of the old write scopes, and add the trust policy the mint checks against. Follow-up to tempoxyz/mpp-tools#195.
sds
added a commit
to tempoxyz/hermes-mpp
that referenced
this pull request
Aug 25, 2026
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Bump the shared tempoxyz/mpp-tools dependabot reusable workflow to the revision that mints a short-lived App token via the github-sts action, grant id-token: write in place of the old write scopes, and add the trust policy the mint checks against. Follow-up to tempoxyz/mpp-tools#195.
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.
Motivation
We are disabling the org-level "Allow GitHub Actions to create and approve pull requests" setting, after which the built-in
GITHUB_TOKENcan no longer open or approve pull requests. This is the only workflow in the org that approves PRs withgithub.token(gh pr review --approve+gh pr mergeon Dependabot patch/minor updates).Changes
tempoxyz/gh-actions/actions/github-sts, SHA-pinned) and use it for the approve and merge steps. The check-watching step keeps the read-only built-in token.id-token: write..github/sts/dependabot.sts.yaml.pull_requestruns carry the barerepo:...:pull_requestOIDC subject, which any PR-triggered workflow in the repo can present, so the policy narrows with claim checks:actor/actor_idmust bedependabot[bot](a human pushing to the PR branch becomes the actor and is denied) andjob_workflow_refmust be this workflow.Things to verify before relying on this
pull_requestruns are permission-restricted like fork PRs; thepermissions:block lifts scopes, but please confirm a Dependabot PR can actually obtain an OIDC token (id-token: write) before flipping the org setting. If it cannot, the fallback is moving this workflow topull_request_targetpinned to the base ref.mpp-toolsand the callers below.Downstream callers need follow-ups
This workflow is also consumed via
workflow_call(pinned by SHA) from mpp, mpp-rs, mpp-go, mpp-specs, pympp, hermes-mpp, and one private repo — at runtime the approve/merge there uses each caller's own token, so those repos break identically when the org setting flips. After this merges, each caller needs a follow-up PR that:checks: read,contents: read,pull-requests: read,id-token: writeon the calling job, and.github/sts/dependabot.sts.yaml(the STS action scopes to the repository the workflow runs against, so the policy lives in the caller).