ci: isolate PR checks from self-hosted runner#87
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac10d2e375
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
athena-omt
left a comment
There was a problem hiding this comment.
APPROVE
The PR does what it says: pull requests now run on a GitHub-hosted macos-15 runner, while trusted push/workflow_dispatch paths stay on the self-hosted macOS ARM64 runner. The policy check was tightened to catch regressions in the PR workflow routing.
Evidence checked:
Validation:
bash scripts/ci/check-ci-policy.shbash scripts/ci/check-shell-syntax.sh
Residual risk is low; I did not find any remaining path where pull_request events can hit the self-hosted runner in this workflow.
Motivation
pull_requestworkflow checked out PR-controlled code and executed repository scripts on a self-hosted macOS runner, enabling arbitrary code execution from untrusted PRs.Description
pr-ci-gatewithif: github.event_name == 'pull_request'that uses a GitHub-hosted runner viaruns-on: - macos-15and runs the existingbash scripts/ci/run-fast-checks.shsteps.trusted-ci-gatejob withif: github.event_name != 'pull_request'that retains the self-hosted runner labels (self-hosted,macOS,ARM64,xcode) for trustedpush/workflow_dispatchevents.scripts/ci/check-ci-policy.shto require the PR workflow include the- macos-15line so local/CI validation will detect regressions.actions/checkout@v4andxcodebuild -versionin both job paths.Testing
bash scripts/ci/check-ci-policy.shand it completed successfully.bash scripts/ci/check-shell-syntax.shand it completed successfully.swift testand the test suite completed successfully.Codex Task