Skip to content

fix: prevent shell injection in GitHub Actions workflows [SEC-1720] [SEC-1721] - #17

Merged
ajbt200128 merged 1 commit into
trunkfrom
security/fix-shell-injection
Mar 24, 2026
Merged

fix: prevent shell injection in GitHub Actions workflows [SEC-1720] [SEC-1721]#17
ajbt200128 merged 1 commit into
trunkfrom
security/fix-shell-injection

Conversation

@leifdreizler

Copy link
Copy Markdown

Summary

  • Replace direct ${{ github.* }} interpolation in run: steps with intermediate env: variables to prevent shell injection attacks
  • Fixes shell injection in build.yml (1 step) and hygiene.yml (3 steps) where attacker-controlled github context values (PR refs, event data) were passed directly into shell commands
  • Linear tickets: SEC-1720, SEC-1721 (assigned to Emma Jin)

Test plan

  • Verify CI workflows still pass with the env variable indirection
  • Confirm no ${{ github.event.* }} or ${{ github.ref }} interpolations remain in run: blocks

🤖 Generated with Claude Code

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
leifdreizler marked this pull request as draft March 24, 2026 05:06
@leifdreizler
leifdreizler requested a review from emjin March 24, 2026 05:06
@ajbt200128
ajbt200128 marked this pull request as ready for review March 24, 2026 18:55
@ajbt200128

Copy link
Copy Markdown

failing build is due to some fork shenanigans it seems, ignoring

@ajbt200128
ajbt200128 merged commit 0599c3d into trunk Mar 24, 2026
20 of 23 checks passed
@leifdreizler
leifdreizler deleted the security/fix-shell-injection branch March 24, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants