Skip to content

Commit 5ddce55

Browse files
committed
Update manual_tags workflow to use intermediate variable to fix possible (#4364)
Update manual_tags workflow to use intermediate variable to fix possible script injection Task: NO-JIRA Signed-off-by: Shard Gupta shardga@amazon.com
1 parent 7235f5d commit 5ddce55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/manual_tags.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ jobs:
2626
fetch-depth: 0
2727
- name: Run create-tag script
2828
env:
29+
TAG_ID: ${{ github.event.inputs.tagId }}
2930
message: ${{ github.event.inputs.message }}
3031
# Run when commit hash is not provided (then the tag will be created on the latest commit of the current branch)
31-
if: ${{github.event.inputs.commit_hash == ''}}
32+
if: ${{ github.event.inputs.commit_hash == '' }}
3233
run: |
33-
bash ./.github/scripts/create-tag.sh -t ${{github.event.inputs.tagId}}
34+
bash ./.github/scripts/create-tag.sh -t "$TAG_ID"
3435
- name: Run create-tag script when commit hash is provided
3536
env:
37+
TAG_ID: ${{ github.event.inputs.tagId }}
38+
COMMIT_HASH: ${{ github.event.inputs.commit_hash }}
3639
message: ${{ github.event.inputs.message }}
3740
# Run when commit hash is provided, tag will be created on top of the commit hash
38-
if: ${{github.event.inputs.commit_hash != ''}}
41+
if: ${{ github.event.inputs.commit_hash != '' }}
3942
run: |
40-
bash ./.github/scripts/create-tag.sh -c ${{github.event.inputs.commit_hash}} -t ${{github.event.inputs.tagId}}
43+
bash ./.github/scripts/create-tag.sh -c "$COMMIT_HASH" -t "$TAG_ID"

0 commit comments

Comments
 (0)