Summary
Tracked from #331 (zizmor CI gate). PR #1530 introduced zizmor enforcement and found that dispatch-to-contribs.yml uses ${{ github.event.inputs.version }} directly inside run: blocks, which is a template injection vector.
The workflow is workflow_dispatch and release-triggered only — no external attacker can trigger it without maintainer write access. The practical risk is low (requires insider intent or a compromised maintainer account), but the fix is mechanical and eliminates the issue entirely.
Affected locations
| File |
Lines |
Expression |
dispatch-to-contribs.yml |
33–34 |
${{ github.event.inputs.version }} in version-resolve run: block |
dispatch-to-contribs.yml |
59 |
${{ steps.version.outputs.version }} in dispatch run: block (low confidence) |
Fix
Route template expressions through environment variables per the AGENTS.md convention:
# Before (vulnerable)
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
# After (safe)
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
if [ -n "${INPUT_VERSION}" ]; then
VERSION="${INPUT_VERSION}"
zizmor --fix can generate the corrected form automatically.
Definition of done
- Route all template expressions in
run: blocks through env: vars
- Remove the
template-injection entries from .github/zizmor.yml
zizmor reports no template-injection findings in dispatch-to-contribs.yml
Summary
Tracked from #331 (zizmor CI gate). PR #1530 introduced zizmor enforcement and found that
dispatch-to-contribs.ymluses${{ github.event.inputs.version }}directly insiderun:blocks, which is a template injection vector.The workflow is
workflow_dispatchandrelease-triggered only — no external attacker can trigger it without maintainer write access. The practical risk is low (requires insider intent or a compromised maintainer account), but the fix is mechanical and eliminates the issue entirely.Affected locations
dispatch-to-contribs.yml${{ github.event.inputs.version }}in version-resolverun:blockdispatch-to-contribs.yml${{ steps.version.outputs.version }}in dispatchrun:block (low confidence)Fix
Route template expressions through environment variables per the AGENTS.md convention:
zizmor --fixcan generate the corrected form automatically.Definition of done
run:blocks throughenv:varstemplate-injectionentries from.github/zizmor.ymlzizmorreports notemplate-injectionfindings indispatch-to-contribs.yml