Repository navigation
Fix: resolve Zizmor findings in vote step - #116
Merged
tykeal merged 1 commit intoJun 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the composite GitHub Action to remediate Zizmor security findings by removing expression interpolation from run: blocks and eliminating cross-step state passing via $GITHUB_ENV, consolidating vote logic into a single step.
Changes:
- Collapses the previous vote-type-specific steps into a single
Votestep using acasestatement to derive labels/status locally. - Moves all templated/untrusted values into the step
env:and references them via quoted shell variables. - Quotes the downstream
ssh -- "$TARGET_HOST"invocation to prevent option/argument injection via the host value.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ModeSevenIndustrialSolutions
force-pushed
the
fix/zizmor-findings
branch
from
June 23, 2026 12:11
0495e76 to
227eccd
Compare
The Clear, Success, Failure and Cancelled steps interpolated the comment-only input directly into bash and exchanged VOTE and STATUS across steps via $GITHUB_ENV, while the Vote step interpolated the change and patchset numbers into a shell assignment. Zizmor flagged six template-injection and four github-env findings. Collapse the four mutually exclusive steps into the Vote step and pass every templated value through an env block, referencing each as a quoted shell variable. This removes the $GITHUB_ENV writes and the direct template interpolation while preserving behaviour. Validate the change and patchset numbers are positive integers (>= 1, no leading zeros) before they are concatenated into the remote gerrit review command, so whitespace or shell metacharacters cannot alter the command sent over ssh. 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 23, 2026 12:21
227eccd to
8c9161c
Compare
tykeal
approved these changes
Jun 23, 2026
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.
Summary
Resolves all 10 high-severity Zizmor
findings reported for
action.yamlby the org-wide security audit(6 ×
template-injection, 4 ×github-env).Problem
Clear,Success,FailureandCancelledsteps interpolated thecomment-onlyinput directly into a bashif [[ ... ]]test(
template-injection) and exchangedVOTE/STATUSbetween steps bywriting to
$GITHUB_ENV(github-env).Votestep interpolatedgerrit-change-numberandgerrit-patchset-numberdirectly into aPATCH=shell assignment(
template-injection).Fix
Votestep, deriving the review labels and status locally fromvote-typevia acasestatement. This removes the cross-step$GITHUB_ENVwrites entirely.vote-type,comment-only, change/patchsetnumbers, the
github.*context values and the target host) through thestep's
env:block and reference each as a quoted shell variable, sonothing is interpolated directly into the
run:body.ssh -- "$TARGET_HOST"invocation is now quoted as well.Behaviour is preserved; an explicit error is now raised for an unknown
vote-typeinstead of silently producing an empty vote.Verification
yamllint,check-yamlandValidate GitHub Actionspre-commit hooks pass.