fix: prevent PR titles with special characters from breaking Slack changelog workflow - #38
Open
BenjaminLangenakenSF wants to merge 2 commits into
Open
fix: prevent PR titles with special characters from breaking Slack changelog workflow#38BenjaminLangenakenSF wants to merge 2 commits into
BenjaminLangenakenSF wants to merge 2 commits into
Conversation
…aking the Slack changelog workflow
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Caution Review failedAn error occurred during the review process. Please try again later. Comment |
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.
Description
PR titles containing double quotes and unquoted parentheses — e.g.
BE-14720: Fix French typo "à été organisé(e)" in electronic meeting text— break theGet PR Detailsstep with a bash syntax error, so the changelog job fails and no Slack message gets posted at all.More generally, this workflow spliced
${{ github context values }}directly into shell script text across all three steps. Since GitHub Actions substitutes${{ }}as literal text before bash parses the line, any PR title containing backticks or$(...)could trigger arbitrary command execution in thePost to Slackstep (PR titles are attacker/contributor controlled).This PR fixes it by passing every GitHub context value through an
env:block instead, so bash treats it as an opaque variable value rather than re-parsing it as script text. Also fixed a related latent bug: the JSON-escapingsedhandled"and newlines but not\, so a title containing a backslash would have produced invalid JSON.Verified locally: the original line reproduces
syntax error near unexpected token '('with the BE-14720 title; the same title passed through an env var (this PR's approach) round-trips cleanly.Fixes # (no tracked issue — found while investigating why BE-14720's title would affect the changelog Slack post)
Type of change
Checklist