ci: fix zizmor template-injection in 5 QA RPC integration workflows (#21132) - #22363
Merged
Merged
Conversation
…21132) Route untrusted/dynamic contexts (runner.*, env.*, steps.*, github.*, matrix.*) through env vars or GitHub built-ins so their values are treated as data rather than substituted into shell text. Drop the five files from the template-injection ignore list in .github/zizmor.yml. Part of #21132.
lystopad
requested review from
AskAlexSharov,
mriccobene and
yperbasis
as code owners
July 9, 2026 20:46
lystopad
enabled auto-merge
July 9, 2026 20:46
AskAlexSharov
approved these changes
Jul 10, 2026
taratorio
added a commit
that referenced
this pull request
Jul 10, 2026
Review follow-up: interpolate matrix.shard through a step env var instead of directly into the run block, matching the cache-warming step's TARGET pattern and the template-injection hardening direction of #22363. matrix.shard is repo-controlled, so hygiene rather than a vulnerability fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #21132 — template-injection cleanup, batch 3 (5 files).
Removes the following from the
template-injectionignore list in.github/zizmor.ymlafter fixing every finding in each:qa-rpc-integration-tests.ymlqa-rpc-integration-tests-gnosis.ymlqa-rpc-integration-tests-latest.ymlqa-rpc-integration-tests-polygon.ymlqa-rpc-integration-tests-clients.ymlWhat changed
${{ … }}expansions insiderun:blocks are substituted into the script text before the shell parses it, so an attacker-influenced value could inject shell code. Each flagged expansion is now routed so its value arrives as data, not code:github.base_ref/github.ref→$GITHUB_BASE_REF/$GITHUB_REF;github.ref_name→$GITHUB_REF_NAME;runner.name→$RUNNER_NAME;github.workspace→$GITHUB_WORKSPACE.env:for contexts with no built-in:runner.workspace→RUNNER_WS;matrix.*→INSTALL_DIR/CLIENT/TEST_SCRIPT;steps.*.outputs.*andsteps.*.outcome→TEST_RESULT/TEST_EXECUTED/SAVE_CHAINDATA_OUTCOME;github.workflow→WORKFLOW.env.TEST_RESULT_DIR,env.CHAIN) referenced directly as$TEST_RESULT_DIR/$CHAIN.The
Generate Summarysteps that built the report via a quoted heredoc are rewritten as an{ echo …; } > fileblock (a quoted heredoc can't expand the routed$VARs, and unquoting it would run the```fence as command substitution). Output is byte-identical.Command substitutions like
$(git rev-parse HEAD)are fixed commands over trusted data and are left as-is.Verification
zizmor 1.24.1with the repo config: 0 template-injection findings across all five files; full-repo exit code unchanged at 12 (< 14, passes the CI gate).actionlint: no errors; SC2086 (info-level shellcheck) counts are ≤ the previous versions for every file — no new findings introduced.