Skip to content

fix: Prevent script injection in release workflow#669

Open
fix-it-felix-sentry[bot] wants to merge 1 commit into
mainfrom
fix/vuln-1609-ghcr-version-tag-injection
Open

fix: Prevent script injection in release workflow#669
fix-it-felix-sentry[bot] wants to merge 1 commit into
mainfrom
fix/vuln-1609-ghcr-version-tag-injection

Conversation

@fix-it-felix-sentry
Copy link
Copy Markdown

Summary

This PR fixes a security vulnerability in the GitHub Actions workflow where GitHub context data was directly interpolated in run scripts, which could allow code injection attacks.

Changes

  • Added env: blocks to steps in release-ghcr-version-tag.yaml
  • Replaced direct ${{ github.ref_name }} and ${{ github.sha }} interpolation with environment variables $REF_NAME and $GITHUB_SHA
  • All environment variables are properly quoted in the script to prevent injection

Security Impact

This fix prevents potential script injection attacks by ensuring GitHub context values are passed through controlled environment variables rather than directly interpolated into shell commands.

References

Use environment variables instead of direct GitHub context interpolation
in run scripts to prevent potential code injection attacks.

Fixes: https://linear.app/getsentry/issue/VULN-1609
Fixes: https://linear.app/getsentry/issue/PRO-40

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@fix-it-felix-sentry fix-it-felix-sentry Bot requested a review from a team as a code owner April 30, 2026 15:02
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 30, 2026

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.

0 participants