Repository navigation
Fix GitHub Actions shell injection vulnerability in setup-builder - #2
Open
fix-it-felix-sentry[bot] wants to merge 1 commit into
Open
fix-it-felix-sentry[bot] wants to merge 1 commit into
fix-it-felix-sentry[bot] wants to merge 1 commit into
Conversation
Move GitHub Actions input values to environment variables to prevent
potential code injection attacks. This addresses a security finding
where untrusted user input from github context could be exploited
to inject malicious code into the runner.
Changes:
- Add env section with RUST_VERSION and TARGETS variables
- Replace all direct ${{ inputs.* }} interpolations with quoted env vars
- Properly quote all variable references in shell commands
Fixes: https://linear.app/getsentry/issue/ENG-7584
Parent: https://linear.app/getsentry/issue/VULN-1623
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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
This PR fixes a high-severity security finding where GitHub Actions input values were being directly interpolated in shell scripts, which could allow attackers to inject malicious code.
Changes
env:section to moveinputs.rust-versionandinputs.targetsto environment variables (RUST_VERSIONandTARGETS)${{ inputs.* }}interpolations with properly quoted environment variable referencesSecurity Impact
This fix prevents potential code injection attacks by ensuring that untrusted GitHub context data is only available as environment variables and properly quoted during use. This follows GitHub's security best practices for hardening GitHub Actions.
References
Testing
The GitHub Actions workflow will validate the syntax when this PR is opened. The action will be tested during the normal CI/CD pipeline execution.