fix: prevent shell injection in GitHub Actions workflows [SEC-1720] [SEC-1721] - #17
Merged
Merged
Conversation
Replace direct ${{ github.* }} interpolation in run: steps with
intermediate env: variables to prevent shell injection attacks.
Fixes issues in build.yml and hygiene.yml where github context
values (ref, event data, PR metadata) were interpolated directly
into shell commands.
Closes SEC-1720
Closes SEC-1721
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
leifdreizler
marked this pull request as draft
March 24, 2026 05:06
ajbt200128
marked this pull request as ready for review
March 24, 2026 18:55
ajbt200128
approved these changes
Mar 24, 2026
|
failing build is due to some fork shenanigans it seems, ignoring |
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
${{ github.* }}interpolation inrun:steps with intermediateenv:variables to prevent shell injection attacksbuild.yml(1 step) andhygiene.yml(3 steps) where attacker-controlled github context values (PR refs, event data) were passed directly into shell commandsTest plan
${{ github.event.* }}or${{ github.ref }}interpolations remain inrun:blocks🤖 Generated with Claude Code