Skip to content

Commit 8b824d9

Browse files
authored
chore: Avoid possible shell injection in branch name (#577)
1 parent e03b144 commit 8b824d9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/update-snapshot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
workflow_run:
55
workflows: [build]
66
types: [completed]
7-
#branches: [github-actions/upgrade-main]
87

98
jobs:
109
on-failure:
@@ -29,7 +28,9 @@ jobs:
2928
npm run bundle
3029
npm run integ:default:snapshot
3130
- name: Switch to branch
32-
run: git checkout ${{ github.event.workflow_run.head_branch }}
31+
env:
32+
BRANCH: ${{ github.event.workflow_run.head_branch }}
33+
run: git checkout "$BRANCH"
3334
- name: Install dependencies
3435
run: yarn install --check-files --frozen-lockfile
3536
- name: Snapshot branch
@@ -82,7 +83,7 @@ jobs:
8283
8384
*Automatically created by projen via the "upgrade-snapshot" workflow*
8485
branch: ${{ github.event.workflow_run.head_branch }}-upgrade-snapshot
85-
title: "chore(deps): update snapshot for dependencies upgrade"
86+
title: "chore(deps): update snapshot"
8687
body: |-
8788
Update snapshot. See details in [workflow run].
8889

0 commit comments

Comments
 (0)