Skip to content

Fix release notes shell injection in create_release workflow - #169

Merged
jamiecobbett merged 1 commit into
masterfrom
fix-bug-in-releases-with-code-in-notes
Sep 1, 2026
Merged

Fix release notes shell injection in create_release workflow#169
jamiecobbett merged 1 commit into
masterfrom
fix-bug-in-releases-with-code-in-notes

Conversation

@jamiecobbett

Copy link
Copy Markdown
Contributor

Summary

  • Changelog entries containing backticks (e.g. `resource_type: x`) were interpolated directly into a double-quoted bash string in the release step, causing bash to treat the backticks as command substitution instead of literal text.
  • Fixes this by passing the notes via the step's env: context instead, so the value is expanded as a shell variable rather than re-parsed as script text.

Same fix as gocardless/gocardless-pro-python#146, which hit this in production when a v3.7.0 changelog entry contained backticked code.

Test plan

  • Reproduced the original failure locally with the affected changelog text and confirmed the old pattern fails identically
  • Confirmed the new pattern preserves the notes text literally with no shell execution

By interpolating the changelog entry into a double quoted bash string, bash
parsed the contents for commands. When the changelog entry included backticks
for a code block, bash tried to execute it.

Passing via the env context avoids this.
@jamiecobbett
jamiecobbett merged commit 7b4c6a4 into master Sep 1, 2026
6 checks passed
@jamiecobbett
jamiecobbett deleted the fix-bug-in-releases-with-code-in-notes branch September 1, 2026 14:34
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