ci: fix zizmor template-injection findings blocking all open PRs - #3003
ci: fix zizmor template-injection findings blocking all open PRs#3003mstruebing wants to merge 1 commit into
Conversation
…ippable
The release workflow interpolated `${{ github.event.inputs.releaseVersion }}`
and `${{ github.ref_name }}` directly into `run:` blocks, which zizmor's
template-injection audit reports as high severity. Pass both through `env:`
and reference them as shell variables instead, matching the pattern already
used by the "Tag release" and "Push tag" steps in the same file.
These findings reached main because the zizmor job lived in test.yml behind a
`paths:` filter that did not cover the workflow files zizmor audits, so the
commit that introduced them never ran the lint. Every later PR touching a
filtered path then failed on the pre-existing findings.
Move the job to its own workflow that runs on all pushes and pull requests
with no `paths:` filter, so a change to a workflow can no longer skip the
lint that guards it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via: Supported
Alternatively, if the co-author should not be included, remove the Please update your commit message(s) by doing |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mstruebing 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 |
The
zizmorcore/zizmor-actionstep fails on every open dependabot PR (#3002, #2997, #2996). The bumps are not the cause — the findings are pre-existing onmainand reproduce against an unmodified checkout.Cause
release.ymlinterpolates${{ github.event.inputs.releaseVersion }}and${{ github.ref_name }}directly intorun:blocks (lines 77 and 84, added in #2911). zizmor'stemplate-injectionaudit rates both high, so the job exits 14.Those findings reached
mainbecause the zizmor job lived intest.ymlbehind apaths:filter covering onlysrc/**,testdata/**, the package/tsconfig/eslint files andtest.ymlitself. A change torelease.ymltherefore could not trigger the lint that auditsrelease.yml, and the regression merged green. Every later PR that does touch a filtered path — i.e. every dependabot npm PR — then failed on findings it did not introduce.The differing errors between PRs are the same root cause seen against different bases: #2996/#2997 ran while
deploy-docs-v2.ymlstill existed and additionally reportedexcessive-permissionson its workflow-levelcontents: write; that file has since been removed, so #3002 shows only the tworelease.ymlfindings.Changes
release.yml— pass both expressions throughenv:and reference them as shell variables, matching the pattern already used by theTag releaseandPush tagsteps in the same file. No behaviour change.zizmor.yml(new) — move the job out oftest.ymland run it on all pushes and pull requests with nopaths:filter, so a workflow change can no longer skip the lint that guards it. The job name is unchanged, and onlyEasyCLAis a required status context, so no required check is affected.Verification
Ran the exact image CI uses (
zizmor v1.29.0,--persona pedantic --min-severity medium) against the tree before and after:Notes for the reviewer
release.yml:84usesgithub.ref_name, which on aworkflow_dispatchrun is the dispatched branch — so the message readsdocs: snapshot version mainrather than the release version. Preserved as-is here since it is a behaviour question, not a lint one, but it looks unintended.zizmor-actionstill resolves the zizmor binary asversion: latest(its default), so a future zizmor release adding audits can surface new findings on unrelated PRs. Pinning would trade that off against the lint going stale; left unchanged, but worth a decision.🤖 Generated with Claude Code