Skip to content

fix: Prevent shell injection in GitHub Actions workflow#8034

Merged
BYK merged 1 commit into
mainfrom
fix/di-1914-shell-injection-vulnerability
May 2, 2026
Merged

fix: Prevent shell injection in GitHub Actions workflow#8034
BYK merged 1 commit into
mainfrom
fix/di-1914-shell-injection-vulnerability

Conversation

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

Summary

This PR fixes a shell injection vulnerability (DI-1914) in the GitHub Actions workflow by using environment variables instead of directly interpolating GitHub context data in shell commands.

Changes

  • Added env variables MERGE_TARGET and REPO to capture GitHub context data
  • Updated run script to use environment variables with proper double-quoting
  • Prevents direct interpolation of fromJSON(steps.inputs.outputs.result) in shell commands

Security Impact

The previous implementation directly interpolated user-controlled GitHub context data into shell commands, which could allow an attacker to inject malicious code. This fix ensures that all GitHub context data is treated as untrusted input and properly sanitized by using environment variables.

References

🤖 Generated with fix-it-felix-sentry[bot]

Fix shell injection vulnerability in publish.yml by using environment
variables instead of directly interpolating GitHub context data in shell
commands. This prevents potential code injection attacks where untrusted
user input could be executed in the runner.

Changes:
- Add env variables MERGE_TARGET and REPO to capture GitHub context data
- Update run script to use environment variables with proper double-quoting
- Prevents direct interpolation of fromJSON(steps.inputs.outputs.result)

Co-Authored-By: fix-it-felix-sentry[bot] <260785270+fix-it-felix-sentry[bot]@users.noreply.github.com>
@fix-it-felix-sentry fix-it-felix-sentry Bot requested a review from a team as a code owner May 2, 2026 09:27
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 2, 2026

@BYK BYK merged commit 2b7999f into main May 2, 2026
10 checks passed
@BYK BYK deleted the fix/di-1914-shell-injection-vulnerability branch May 2, 2026 22:44
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.

1 participant