mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
ci: gate nix-build on same-repo PRs only
scripts/update-nix.sh and scripts/fix-lockfile.mjs are executed from the PR's checked-out tree. A fork PR can modify those scripts to run arbitrary code on the runner. Same-repo PRs and push-to-main still run; fork PRs skip the job entirely. Closes #365.
This commit is contained in:
5
.github/workflows/nix-build.yml
vendored
5
.github/workflows/nix-build.yml
vendored
@@ -37,6 +37,11 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
# Skip fork PRs: this workflow executes scripts/update-nix.sh and
|
||||||
|
# scripts/fix-lockfile.mjs from the checked-out tree. A fork could
|
||||||
|
# edit those to run arbitrary code on the runner. Same-repo PRs and
|
||||||
|
# main pushes still run.
|
||||||
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/create-github-app-token@v1
|
- uses: actions/create-github-app-token@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user