Repository navigation
π± ci: stop persisting checkout credentials in PR-tree workflows - #17682
clubanderson wants to merge 1 commit into
Conversation
Set persist-credentials: false on the actions/checkout step of the five pull_request workflows that run scripts, tests or image builds from the PR tree (mutation-advisory, pr-overlap, stream-image, ci-runner-image, docs-index-reminder). None of them pushes or fetches with the job token; API calls keep getting it via step env under the job's permissions block. Fixes #17636 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible β a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
|
/lgtm |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
Changelog fragment in the wrong directoryFragments live in git mv src/changelog.d/changed-checkout-no-persist-credentials.md changelog.d/changed-checkout-no-persist-credentials.md
git commit -s -m "changelog: move fragment to repo-root changelog.d/"See |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
There was a problem hiding this comment.
Decision needed: @clubanderson should confirm this workflow-file change (checkout persist-credentials: false on five pull_request workflows) is intended to land as-is once the changelog fragment is moved to the repository root.
One blocking issue, otherwise the change does what it says.
Changelog fragment is in the wrong directory β this is why changelog-fragment-guard is red.
src/changelog.d/changed-checkout-no-persist-credentials.md is under src/; fragments live at the repository root. src/changelog.d/README.md:1-13 says exactly this: src/scripts/compile-changelog.sh only reads the root changelog.d/, so a fragment here is never compiled into CHANGELOG.md and the guard rejects it (#11919). Fix:
git mv src/changelog.d/changed-checkout-no-persist-credentials.md changelog.d/The workflow change itself checks out. I read the five workflows at the base tree: none runs git push/git fetch/git ls-remote after checkout. mutation-advisory.yml:51, pr-overlap.yml:33, docs-index-reminder.yml:55,90 take the token via step env (GH_TOKEN), which is unaffected by persist-credentials. stream-image.yml and ci-runner-image.yml are build-only on pull_request (stream-image.yml:21, ci-runner-image.yml:39) and push images with a registry login, not the git credential. The latest Build (PR gate, no push) run on this head (43043477832) passed, so the FAILURE in the checks rollup is a superseded run, not this diff.
This touches .github/workflows/, so I am routing rather than calling it done: it is a privilege reduction, authored by the repository owner, and I found nothing in it that weakens a check or widens a permission. I have not changed anything.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
7af024e
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Triage of the three red checks on
Human-authored PR, so the hive is not pushing to this branch. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Sets
persist-credentials: falseon theactions/checkoutstep of the fivepull_requestworkflows that run scripts, tests or image builds from the PR tree:mutation-advisory.ymlpr-overlap.ymlstream-image.ymlci-runner-image.ymldocs-index-reminder.ymlNone of these jobs pushes or fetches with the job token (
pr-overlap.shfetches public refs; API calls takeGH_TOKEN/github.tokenfrom stepenv, scoped by each job'spermissions:block), so nothing in the job needs the credential left in.git/config.changelog-fragment-guard.ymlalready sets it; the only step there that pushes usesPUSH_TOKENfrom step env.Decision on the proposal: accept β every
pull_request/pull_request_targetjob that runs PR-tree code checks out without persisted credentials; credentials are kept only where a later step pushes or comments, scoped viapermissions:. Workflow files need a human push, hence this PR.Includes a
changelog.d/changed-*fragment.Fixes #17636