ci: forks never reach keel-lxc-1, and no expression in a run block #18
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/.github!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/fork-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The security review of the runner hardening (#16) found that a fork's pull request, once someone clicked "Approve and run", still ran on
keel-lxc-1, the VM that serves keellinux.org. Neithertest-appliance.ymlnorbuild-deb.ymlhad a fork guard.lxc-trixie.ymlin #17 already has one.What changes
boot-published-layer(test-appliance.yml) anddeb(build-deb.yml) carry the guardlxc-trixie.ymluses. It refusespull_request_target, and anypull_requestwhose head repository is not the repository itself.if:reports success, and branch protection counts a skipped required check as passed. So on a fork's pull request the requiredappliance / boot-published-layershows as skipped and does not block. To keep that from passing for a boot,test-appliance.ymlalso runsfork-not-bootedon a hosted runner in exactly that case. It fails with the reason and shows as a redappliance / fork-not-booted. That check blocks a merge only where it is made a required check, and adding it as required is harmless for internal pull requests, where it is skipped.applianceinput is checked against^[a-z0-9-]+$before it reaches a path, a container name or the mirror URL.env:instead of an expression insiderun:.profile/WORKFLOWS.mddocuments the guard, plus the runner group's workflow restriction set the same day: only the reusable workflows of this repository atrefs/heads/mainget the runner.Evidence
appliance / boot-published-layergreen,appliance / fork-not-bootedskipped.Test plan
lint / actionlintandtests / coveragegreenboot-published-layergreen,fork-not-bootedskipped