Skip to content

Commit

Permalink
chore: Avoid possible shell injection in branch name (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
kichik authored May 22, 2024
1 parent e03b144 commit 8b824d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/update-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_run:
workflows: [build]
types: [completed]
#branches: [github-actions/upgrade-main]

jobs:
on-failure:
Expand All @@ -29,7 +28,9 @@ jobs:
npm run bundle
npm run integ:default:snapshot
- name: Switch to branch
run: git checkout ${{ github.event.workflow_run.head_branch }}
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
run: git checkout "$BRANCH"
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Snapshot branch
Expand Down Expand Up @@ -82,7 +83,7 @@ jobs:
*Automatically created by projen via the "upgrade-snapshot" workflow*
branch: ${{ github.event.workflow_run.head_branch }}-upgrade-snapshot
title: "chore(deps): update snapshot for dependencies upgrade"
title: "chore(deps): update snapshot"
body: |-
Update snapshot. See details in [workflow run].
Expand Down

0 comments on commit 8b824d9

Please sign in to comment.