Skip to content

Commit 80e1338

Browse files
authored
Fix Github Workflow vulnerable to script injection (#14379)
fix: github workflow vulnerable to script injection Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
1 parent dce00a8 commit 80e1338

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/stage-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
env:
88
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9+
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
910

1011
jobs:
1112
github-release:
@@ -20,7 +21,6 @@ jobs:
2021
- name: Extract version from branch name
2122
id: extract_version
2223
run: |
23-
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
2424
VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
2525
echo "VERSION=$VERSION" >> $GITHUB_ENV
2626
- name: Prep git

0 commit comments

Comments
 (0)