fix(ci): [OPS-723] prevent script injection in workflow run: blocks#17
Merged
fix(ci): [OPS-723] prevent script injection in workflow run: blocks#17
Conversation
Move all ${{ }} expressions from run: blocks to env: blocks to prevent
potential shell injection in public repo CI. Replace fragile matrix.install
pattern with conditional steps.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Branch protection requires check names that include the install command
(e.g. "build (ubuntu-latest, sudo apt-get update ...)"). Keep the
include matrix for naming but use conditional steps instead of
${{ matrix.install }} for execution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shahar-davidson
approved these changes
Apr 7, 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
${{ }}expressions fromrun:blocks toenv:blocks across 4 workflow files to prevent potential shell injection in this public repo${{ matrix.install }}pattern inci.ymlwith conditionalif: runner.ossteps (matching existing pattern in release workflows)${{ needs.release-please.outputs.tag_name }}was interpolated directly into shell commands inrelease-please.ymlFiles Changed
.github/workflows/release-please.yml—tag_name,goos,goarch→env:block.github/workflows/release.yml—goos,goarch→ use existing$GOOS/$GOARCHenv vars.github/workflows/ci.yml— replacematrix.installwith conditional steps.github/workflows/gitleaks.yaml—event_name, SHAs,forced→env:blockTest plan
yaml.safe_load)${{ }}remain in anyrun:block (checked locally)Jira: https://knostic.atlassian.net/browse/OPS-723
🤖 Generated with Claude Code