Skip to content

fix(workflows): restore persisted creds on caller checkout for open-pr#147

Merged
DevSecNinja merged 1 commit into
mainfrom
fix/config-sync-restore-push-creds
Jun 1, 2026
Merged

fix(workflows): restore persisted creds on caller checkout for open-pr#147
DevSecNinja merged 1 commit into
mainfrom
fix/config-sync-restore-push-creds

Conversation

@DevSecNinja
Copy link
Copy Markdown
Owner

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.

Description

Changes

Checklist

  • Linting passes locally (mise exec -- lefthook run pre-commit)
  • Commit messages follow Conventional Commits
  • Documentation updated (if applicable)

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>
@DevSecNinja DevSecNinja merged commit 2ffca5f into main Jun 1, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants