Skip to content

fix(ci): route template expressions through env in dispatch-to-contribs - #1717

Merged
jakelorocco merged 1 commit into
generative-computing:mainfrom
simoncraf:fix/1532-dispatch-template-injection
Oct 8, 2026
Merged

jakelorocco merged 1 commit into
generative-computing:mainfrom
simoncraf:fix/1532-dispatch-template-injection

Conversation

@simoncraf

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #1532

Description

dispatch-to-contribs.yml put ${{ github.event.inputs.version }} and ${{ steps.version.outputs.version }} directly inside run: blocks. zizmor flags this as a template injection vector (found when the zizmor CI gate was added in #1530).

This PR:

  • Passes both expressions to the shell through step-level env: variables (INPUT_VERSION, VERSION), following the AGENTS.md convention.
  • Removes the template-injection ignore entries for this file from .github/zizmor.yml.

Behaviour is unchanged: the dispatch payload carries the same version string.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Ran zizmor locally with the repo config (zizmor --offline --config .github/zizmor.yml .github/workflows/):

  • dispatch-to-contribs.yml: no findings.
  • All workflows: the ignored count drops from 10 to 7 and no new findings appear. The 5 remaining low-severity self-repository hints are also present on main.

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

🤖 Generated with Claude Code

@simoncraf
simoncraf requested a review from a team as a code owner October 8, 2026 13:10
@github-actions github-actions Bot added the bug Something isn't working label Oct 8, 2026
@jakelorocco

Copy link
Copy Markdown
Contributor

I think the zizmore failures are related to #1713.

Route `github.event.inputs.version` and `steps.version.outputs.version`
through step-level `env:` variables instead of putting `${{ }}`
expressions directly in `run:` blocks. This removes the template
injection vector that zizmor flagged.

Remove the now-unneeded `template-injection` ignore entries from
`.github/zizmor.yml`. zizmor reports no findings in
dispatch-to-contribs.yml.

Closes generative-computing#1532

Assisted-by: Claude Code
Signed-off-by: Simone Gigante <[email protected]>
@simoncraf
simoncraf force-pushed the fix/1532-dispatch-template-injection branch from b6a9416 to 7db6761 Compare October 8, 2026 16:22
@simoncraf

Copy link
Copy Markdown
Contributor Author

@jakelorocco Yep, that was it, thanks! I rebased onto main to pick up #1713

@jakelorocco
jakelorocco enabled auto-merge October 8, 2026 16:30
@jakelorocco

Copy link
Copy Markdown
Contributor

Thanks for the contribution! It should merge when the checks pass.

@jakelorocco
jakelorocco added this pull request to the merge queue Oct 8, 2026
Merged via the queue into generative-computing:main with commit 84c3cea Oct 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: route workflow_dispatch inputs through env vars to prevent template injection (template-injection)

2 participants