Skip to content

Commit 5c0eb9c

Browse files
committed
MESH-2530 Fix action vulnerable to script injection
1 parent dd8e4d7 commit 5c0eb9c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/pull-request.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,14 @@ jobs:
297297
- name: merge into base_branch
298298
if: ${{ github.event_name == 'pull_request' }}
299299
run: |
300-
echo base branch "${{ github.base_ref }}"
301-
echo pr branch "${{ github.head_ref }}"
302-
git checkout "${{ github.base_ref }}"
300+
echo base branch "$BASE_BRANCH"
301+
echo pr branch "$PR_BRANCH"
302+
git checkout "$BASE_BRANCH"
303303
git checkout -b "merging-${{ github.event.number }}"
304304
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
305+
env:
306+
BASE_BRANCH: ${{ github.base_ref }}
307+
PR_BRANCH: ${{ github.head_ref }}
305308

306309
- name: setup python
307310
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)