Skip to content

Commit c94f2d0

Browse files
abhizipstackclaude
andcommitted
fix: pass release event data via env to prevent script injection
Use env variables instead of direct ${{ }} interpolation in run block to prevent shell injection from release names with metacharacters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a7a05c5 commit c94f2d0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/release-notification.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ jobs:
1111
steps:
1212
- name: Build Slack message
1313
id: message
14+
env:
15+
TAG: ${{ github.event.release.tag_name }}
16+
RELEASE_NAME: ${{ github.event.release.name }}
17+
URL: ${{ github.event.release.html_url }}
1418
run: |
15-
TAG="${{ github.event.release.tag_name }}"
16-
NAME=$(echo '${{ toJSON(github.event.release.name) }}' | jq -r '.')
17-
URL="${{ github.event.release.html_url }}"
18-
echo "text=🚀 *Visitran ${TAG}* released! ${NAME} <${URL}|View Release Notes>" >> "$GITHUB_OUTPUT"
19+
echo "text=🚀 *Visitran ${TAG}* released! ${RELEASE_NAME} <${URL}|View Release Notes>" >> "$GITHUB_OUTPUT"
1920
2021
- name: Post to Slack
2122
uses: slackapi/slack-github-action@v2.1.0

0 commit comments

Comments
 (0)