fix(publish): read release body via env, not inline shell interpolation#11
Merged
Merged
Conversation
The prep step set BODY=${{ toJSON(github.event.release.body) }}. toJSON
escapes quotes/backslashes/newlines but NOT backticks or $(...), so those
stay live inside the resulting double-quoted shell string. A release body
containing an inline `code` span (backticks) therefore ran as a command
(exit 127 "command not found") and aborted the publish; it was also a
shell-injection vector and left literal \r\n in changelog.md.
Pass the body through the environment (RELEASE_BODY) and read it with
"$RELEASE_BODY" so the shell never parses its contents. Manual dispatch
(no release event) yields an empty body and still falls back to
"Release $VERSION".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153KLwL66bB31pTc4BtsTMd
tastybento
added a commit
to BentoBoxWorld/BentoBox
that referenced
this pull request
Jul 1, 2026
Picks up BentoBoxWorld/.github#11 — the publish prep step now reads the release body from an env var instead of inlining it into the shell, so backticks/$() in release notes no longer break the CurseForge/Hangar publish (as happened on 3.18.1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153KLwL66bB31pTc4BtsTMd
This was referenced Jul 1, 2026
tastybento
added a commit
to BentoBoxWorld/Biomes
that referenced
this pull request
Jul 1, 2026
Picks up BentoBoxWorld/.github#11 — the publish prep step now reads the release body from an environment variable instead of inlining it into the shell. Inline interpolation left backticks and command-substitution live inside the shell string, which broke the CurseForge/Hangar publish when release notes contained inline code (as happened on BentoBox 3.18.1). No change to this repo's build. Generated with Claude Code.
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.
Problem
publish-platforms.yml'sprepstep staged the changelog with:BODY=${{ toJSON(github.event.release.body) }}toJSONescapes",\and newlines, but not backticks or$(...), which remain live inside the resulting double-quoted shell string. A release whose body contains an inline`code`span therefore executes it as a command:This broke BentoBox's 3.18.1 CurseForge/Hangar publish (failed run), is a shell-injection vector (a crafted release body could run arbitrary commands on the runner), and also left literal
\r\ninchangelog.md.Fix
Pass the body through the environment and read it with
"$RELEASE_BODY", so the shell never parses its contents:Backticks,
$(...)and$VARin release notes are now preserved literally, real newlines survive, and manualworkflow_dispatch(no release event → empty body) still falls back toRelease $VERSION.Blast radius
This reusable workflow is used by every BentoBox repo's publish, so the fix applies org-wide. Consumers pin it by SHA; they'll pick up the fix when they re-pin to the merge commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_0153KLwL66bB31pTc4BtsTMd