Skip to content

Pass inputs through env vars#3549

Merged
rnro merged 1 commit intomainfrom
pass_inputs_through_env_vars
Mar 12, 2026
Merged

Pass inputs through env vars#3549
rnro merged 1 commit intomainfrom
pass_inputs_through_env_vars

Conversation

@rnro
Copy link
Copy Markdown
Contributor

@rnro rnro commented Mar 12, 2026

Pass workflow inputs through environment variables instead of inline template expansion

Motivation

Modifications

  • Move ${{ inputs.* }} and ${{ matrix.config.* }} references out of run: blocks and into step-level env: blocks across 13 workflow files.

Result

  • All high-confidence template-injection findings from zizmor are resolved.
  • No changes should be required in downstream caller workflows

This can be seen successfully in use via test commits here:

…template expansion

Motivation

* `${{ inputs.* }}` expressions used directly in `run:` blocks are expanded by GitHub Actions before the shell runs, which can allow code injection via template expansion (see https://docs.zizmor.sh/audits/#template-injection).

Modifications

* Move `${{ inputs.* }}` and `${{ matrix.config.* }}` references out of `run:` blocks and into step-level `env:` blocks across 13 workflow files.

Result

* All high-confidence `template-injection` findings from `zizmor` are resolved.
* No changes should be required in downstream caller workflows
@rnro rnro force-pushed the pass_inputs_through_env_vars branch from 13407d1 to 8398314 Compare March 12, 2026 12:41
@rnro rnro added the semver/none No version bump required. label Mar 12, 2026
@rnro rnro marked this pull request as ready for review March 12, 2026 12:42
@rnro rnro merged commit b315658 into main Mar 12, 2026
49 of 54 checks passed
@rnro rnro deleted the pass_inputs_through_env_vars branch March 12, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants