Skip to content

Commit 080f36d

Browse files
committed
Prevent env injection
1 parent dd452b0 commit 080f36d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/preview-clean.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
- name: Extract PR number
3535
run: |
3636
PR_NUMBER=$(cat ./preview-id)
37+
if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
38+
echo "Invalid preview-id: $PR_NUMBER"
39+
exit 1
40+
fi
3741
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
3842
- name: Disable deploy at GitHub
3943
continue-on-error: true

0 commit comments

Comments
 (0)