Repository navigation
Fix: resolve Zizmor template and env findings - #119
Merged
tykeal merged 1 commit intoJun 24, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the composite GitHub Action to address Zizmor findings by eliminating risky $GITHUB_ENV usage and avoiding direct template interpolation of path_prefix into shell bodies, while keeping the action’s documented outputs unchanged.
Changes:
- Promote
path_prefixfrom$GITHUB_ENVto a dedicatedsetupstep output and update all consumers to usesteps.setup.outputs.path_prefix. - Pass
path_prefixinto thesetup.cfgparsing step via anenv:variable and reference it as a quoted shell variable inrun:. - Remove redundant
$GITHUB_ENVwrites in the capture step, keeping$GITHUB_OUTPUTas the sole documented contract.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zizmor's regular-persona audit flagged template-injection and
github-env findings in the composite action.
The setup step exposed path_prefix via GITHUB_ENV, then several
later steps interpolated ${{ env.path_prefix }} directly into
templated fields and a run block. Promote path_prefix to a proper
step output (id: setup) and rewire every consumer to read
steps.setup.outputs.path_prefix. The setup.cfg step now receives
the value through a dedicated env block and references it as a
quoted shell variable rather than expanding a template into the
run body.
path_prefix is user-controlled, so emit it to GITHUB_OUTPUT using
the documented multiline-delimiter form: a value containing a
newline cannot append additional output keys (output-injection
hardening).
The capture step wrote each result to both GITHUB_ENV and
GITHUB_OUTPUT. The README documents only the step outputs as the
public contract, so drop the redundant GITHUB_ENV writes that
triggered the github-env finding.
The action's documented output contract is unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
fix/zizmor-findings
branch
from
June 24, 2026 12:11
1e044e8 to
b10f005
Compare
tykeal
approved these changes
Jun 24, 2026
tykeal
left a comment
Contributor
There was a problem hiding this comment.
🤖 Dependamerge
Approved this pull request ✅
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.
Pull request overview
Zizmor's regular-persona audit (the configuration used by the
organisation-level scheduled scan) reported
template-injectionandgithub-envfindings in this composite action. This change resolvesall of them, bringing the action to zero medium-or-higher findings.
Changes
template-injection / github-env (path_prefix): the setup step
exposed
path_prefixvia$GITHUB_ENV, and several later stepsinterpolated
${{ env.path_prefix }}directly into templated fieldsand a
runblock.path_prefixis now promoted to a proper stepoutput (
id: setup), and every consumer readssteps.setup.outputs.path_prefix. Thesetup.cfgstep receives thevalue through a dedicated
env:block and references it as a quotedshell variable instead of expanding a template into the run body.
output-injection hardening: because
path_prefixisuser-controlled, it is emitted to
$GITHUB_OUTPUTusing thedocumented multiline-delimiter form, so a value containing a newline
cannot append additional output keys.
github-env (capture step): the capture step wrote each result to
both
$GITHUB_ENVand$GITHUB_OUTPUT. The README documents onlythe step outputs as the public contract, so the redundant
$GITHUB_ENVwrites have been removed.Impact
The action's documented output contract is unchanged.