fix(workflows): restore persisted creds on caller checkout for open-pr#147
Merged
Conversation
The hardening commits in PRs #146 and #84 set `persist-credentials: false` on the calling-repo `actions/checkout` step. That broke PR creation because the `actions/open-pr` composite invokes `git push`, which only authenticates via the bearer token that `actions/checkout` writes into the remote URL. Without the persisted token the push fails with HTTP 403, as observed on https://github.com/DevSecNinja/wazzup/actions/runs/26754084476. Restore the default `persist-credentials: true` on the calling-repo checkout for both `config-sync.yml` and `vendored-file-sync.yml`. Suppress the resulting zizmor `artipacked` finding inline with a justification comment: - `config-sync.yml`: this job never executes content fetched from the central repo. It clones `DevSecNinja/.github` (with `persist-credentials: false`) and only `cp`-s files out of it, so persisted creds on the caller checkout cannot leak via that data path. - `vendored-file-sync.yml`: the caller-supplied `refresh-command` runs in this same job; the trust boundary is identical to any caller-owned step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The hardening commits in PRs #146 and #84 set
persist-credentials: falseon the calling-repoactions/checkoutstep. That broke PR creation because theactions/open-prcomposite invokesgit push, which only authenticates via the bearer token thatactions/checkoutwrites into the remote URL. Without the persisted token the push fails with HTTP 403, as observed on https://github.com/DevSecNinja/wazzup/actions/runs/26754084476.Restore the default
persist-credentials: trueon the calling-repo checkout for bothconfig-sync.ymlandvendored-file-sync.yml. Suppress the resulting zizmorartipackedfinding inline with a justification comment:config-sync.yml: this job never executes content fetched from the central repo. It clonesDevSecNinja/.github(withpersist-credentials: false) and onlycp-s files out of it, so persisted creds on the caller checkout cannot leak via that data path.vendored-file-sync.yml: the caller-suppliedrefresh-commandruns in this same job; the trust boundary is identical to any caller-owned step.Description
Changes
Checklist
mise exec -- lefthook run pre-commit)