Skip to content

Commit 5ece657

Browse files
committed
Fix CI
Getting this in CI runs, like https://github.com/NixOS/org/actions/runs/31025754088/job/92373643252?pr=276: > Error: Refusing to check out fork pull request code from a 'pull_request_target' workflow. This workflow runs with the base repository's GITHUB_TOKEN, secrets, default-branch cache scope, and runner access. Fetching and executing a fork's code in that trusted context commonly leads to "pwn request" vulnerabilities. To opt in, review the risks at https://gh.io/securely-using-pull_request_target and set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.
1 parent fadbfb3 commit 5ece657

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
ref: refs/pull/${{ github.event.pull_request.number }}/merge
1818
path: untrusted-pr
19+
allow-unsafe-pr-checkout: true
1920

2021
- uses: serokell/xrefcheck-action@v1
2122
with:
@@ -39,6 +40,7 @@ jobs:
3940
with:
4041
ref: refs/pull/${{ github.event.pull_request.number }}/merge
4142
path: untrusted-pr
43+
allow-unsafe-pr-checkout: true
4244

4345
- name: Validate codeowners
4446
run: result/bin/codeowners-validator

0 commit comments

Comments
 (0)