Skip to content

Security: Fix untrusted input vulnerability in release workflow - 7.0.x#223

Merged
bobbrodie merged 1 commit intobitpay:7.0.xfrom
swlodarski-sumoheavy:7.0.x-gh-actions-untrusted-input
Feb 2, 2026
Merged

Security: Fix untrusted input vulnerability in release workflow - 7.0.x#223
bobbrodie merged 1 commit intobitpay:7.0.xfrom
swlodarski-sumoheavy:7.0.x-gh-actions-untrusted-input

Conversation

@swlodarski-sumoheavy
Copy link
Collaborator

Security Fix: Prevent Command Injection in Release Workflow

Summary

This PR fixes a command injection vulnerability in the GitHub Actions release workflow by moving all untrusted inputs and GitHub context variables to environment variables.

Problem

The workflow was directly interpolating user inputs and GitHub context variables into shell commands, which could allow command injection attacks. Specifically:

  • ${{ github.event.release.name }} - GitHub context variable
  • ${{ github.event.release.body }} - GitHub context variable
  • ${{ steps.release.outputs.title }} - Step output used in shell commands
  • ${{ steps.release.outputs.body }} - Step output used in shell commands

Solution

All potentially untrusted values are now passed through environment variables before being used in shell commands. This ensures they are treated as literal strings rather than being evaluated as code.

Changes made:

  1. Extract release data step: Added RELEASE_NAME and RELEASE_BODY environment variables to safely capture untrusted input
  2. Publish changelog step: Added RELEASE_TITLE and RELEASE_BODY environment variables to safely pass step outputs

Security Impact

This follows the security best practices outlined in the GitHub Security Lab advisory and prevents potential command injection through GitHub Actions expressions.

Testing

  • Workflow syntax is valid
  • No functional changes to workflow behavior
  • All steps continue to work as expected

@swlodarski-sumoheavy swlodarski-sumoheavy changed the title Security: Fix untrusted input vulnerability in release workflow Security: Fix untrusted input vulnerability in release workflow - 7.0.x Feb 2, 2026
@bobbrodie bobbrodie merged commit 0549d9a into bitpay:7.0.x Feb 2, 2026
7 checks passed
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