Summary
Follow-up from PR #7332, requested by @LesnyRumcajs.
The PR added a preliminary changes job (using dorny/paths-filter) to several lint workflows to work around the fact that merge_group events do not support path filters. Each of these new changes jobs performs an actions/checkout@v7 step that is read-only (only used to evaluate the diff for path filtering), but does not set persist-credentials: false.
zizmor flagged this as a potential "artipacked" credential persistence issue: by default, actions/checkout persists the Git token in the local git config, which could be exposed to subsequent steps/artifacts if not needed.
Affected files
.github/workflows/actions-lint.yml
.github/workflows/docker-lint.yml
.github/workflows/docs-check.yml
.github/workflows/go-lint.yml
.github/workflows/link-check.yml
.github/workflows/lists-lint.yml
.github/workflows/rubocop.yml
.github/workflows/shellcheck.yml
.github/workflows/yaml-lint.yml
Suggested change
For the actions/checkout@v7 step within each changes job, add:
with:
persist-credentials: false
This was intentionally deferred as out-of-scope for PR #7332, which focuses on the path-filter gating logic itself.
Acceptance criteria
- Decide whether this is worth addressing (low risk, since these are read-only checkouts in public-repo lint jobs) or can be closed as won't-fix.
- If addressed, add
persist-credentials: false to the checkout step in each affected changes job across the listed workflow files.
References
Summary
Follow-up from PR #7332, requested by @LesnyRumcajs.
The PR added a preliminary
changesjob (usingdorny/paths-filter) to several lint workflows to work around the fact thatmerge_groupevents do not support path filters. Each of these newchangesjobs performs anactions/checkout@v7step that is read-only (only used to evaluate the diff for path filtering), but does not setpersist-credentials: false.zizmor flagged this as a potential "artipacked" credential persistence issue: by default,
actions/checkoutpersists the Git token in the local git config, which could be exposed to subsequent steps/artifacts if not needed.Affected files
.github/workflows/actions-lint.yml.github/workflows/docker-lint.yml.github/workflows/docs-check.yml.github/workflows/go-lint.yml.github/workflows/link-check.yml.github/workflows/lists-lint.yml.github/workflows/rubocop.yml.github/workflows/shellcheck.yml.github/workflows/yaml-lint.ymlSuggested change
For the
actions/checkout@v7step within eachchangesjob, add:This was intentionally deferred as out-of-scope for PR #7332, which focuses on the path-filter gating logic itself.
Acceptance criteria
persist-credentials: falseto the checkout step in each affectedchangesjob across the listed workflow files.References