Skip to content

Fix shell injection in update-changelog workflow for PR titles with backticks#897

Merged
DannyvdSluijs merged 1 commit intomainfrom
copilot/fix-changelog-entry-error
Mar 17, 2026
Merged

Fix shell injection in update-changelog workflow for PR titles with backticks#897
DannyvdSluijs merged 1 commit intomainfrom
copilot/fix-changelog-entry-error

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

PR titles containing backticks (e.g., "Remove v prefix from release tags") cause the changelog workflow to fail with v: command not found because bash interprets backticks as command substitution.

Changes

  • Move variable assignments from run: to env: block in the "Update CHANGELOG.md" step

Before

run: |
  PR_TITLE="${{ github.event.pull_request.title }}"  # Backticks interpreted by bash

After

env:
  PR_TITLE: ${{ github.event.pull_request.title }}  # Set by GHA before shell runs
run: |
  ./bin/update-changelog.sh "$PR_TITLE" ...

Using the env: block ensures GitHub Actions sets environment variables before the shell executes, preventing interpretation of special characters.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Fix changelog entry failing action due to the PR title Fix shell injection in update-changelog workflow for PR titles with backticks Mar 17, 2026
Copilot AI requested a review from DannyvdSluijs March 17, 2026 10:19
…injection

Move variable assignments from run: block to env: block to prevent
bash from interpreting backticks in PR titles as command substitution.

Fixes issue where PR titles like "Remove `v` prefix..." would fail with
"v: command not found" error.

Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
@DannyvdSluijs DannyvdSluijs force-pushed the copilot/fix-changelog-entry-error branch from 753165c to 7a0e6c2 Compare March 17, 2026 10:23
@DannyvdSluijs DannyvdSluijs marked this pull request as ready for review March 17, 2026 10:23
@DannyvdSluijs DannyvdSluijs merged commit 03b343e into main Mar 17, 2026
18 checks passed
@DannyvdSluijs DannyvdSluijs deleted the copilot/fix-changelog-entry-error branch March 17, 2026 10:27
github-actions bot added a commit that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants