Skip to content

Commit ce5130f

Browse files
authored
fix: github workflow vulnerable to script injection (#9331)
Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
1 parent 562015c commit ce5130f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/benchmarks.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
types: [opened, reopened, synchronize, labeled]
66
workflow_dispatch:
77

8+
env:
9+
PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
10+
811
jobs:
912
benchmark:
1013
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
@@ -49,7 +52,7 @@ jobs:
4952
# ID this runner
5053
asv machine --yes
5154
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
52-
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
55+
echo "Contender: ${GITHUB_SHA} ($PR_HEAD_LABEL)"
5356
# Run benchmarks for current commit against base
5457
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
5558
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \

0 commit comments

Comments
 (0)