Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

github: prevent script injections via PR branch names #137

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/trigger-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
route: GET /repos/${{ github.repository }}/pulls

- name: Checkout branch
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
# yamllint disable rule:line-length
run: |
PR_DATA=$(mktemp)
Expand All @@ -48,7 +50,7 @@ jobs:
if [ ! -z "$PR" ]; then
git checkout -b PR-$PR
else
git checkout ${{ github.event.workflow_run.head_branch }} --
git checkout "${BRANCH}" --
fi
# yamllint enable rule:line-length

Expand Down
Loading