Skip to content

Commit c6844ba

Browse files
authored
fix: make Github Action safe to RCE via pull request title (#1600)
1 parent 36d632d commit c6844ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ jobs:
3434
- uses: actions/checkout@v4
3535
- name: Extract version to be released
3636
id: get-version
37+
env:
38+
PR_TITLE: ${{ github.event.pull_request.title }}
3739
run: |
3840
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
3941
echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
4042
else
41-
TITLE="${{ github.event.pull_request.title }}"
42-
echo "version=${TITLE/: [[:alnum:]]*}" >> "$GITHUB_OUTPUT"
43+
echo "version=${PR_TITLE/: [[:alnum:]]*}" >> "$GITHUB_OUTPUT"
4344
fi
4445
- name: Bump version and push tag
4546
uses: mathieudutour/[email protected]

0 commit comments

Comments
 (0)