Skip to content

Commit 85fb85d

Browse files
committed
fix: prevent script injection in tag-on-merge workflow
Use environment variable instead of direct interpolation of github.event.pull_request.head.ref to prevent command injection.
1 parent 8d53c56 commit 85fb85d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/tag-on-merge.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323

2424
- name: Extract version from branch name
2525
id: version
26+
env:
27+
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
2628
run: |
27-
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
2829
VERSION=${BRANCH_NAME#release/}
2930
echo "version=$VERSION" >> $GITHUB_OUTPUT
3031

0 commit comments

Comments
 (0)