Repository navigation
ci(codspeed): say what actually keeps fork code off the macro runner, and that a read-only member's fork PR gets through (celeris#864) - #108
Conversation
… and that a read-only member's fork PR gets through (celeris#864) The header said "code from a fork never runs on it" about the job's `if:`. On pull_request the workflow comes from the pull request's merge ref, so a fork can delete that `if:` or add a workflow of its own; what holds is the fork-PR approval policy, and it does not hold an organization member's fork PR. The header now says so, as celeris's codspeed.yml has since celeris#725, names the settings change that closes it (celeris#864), and replaces the stale "until an owner allows public repositories" note with the three prerequisites, all done on 2026-09-26. The `if:` is unchanged: it already skips every fork shape, a deleted fork's included.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (1)Every uses: is pinned to a full commit SHA with a version comment (the repository requires SHA pinning).⚙️ CodeRabbit configuration file Files:
🔇 Additional comments (1)
📝 SummarySummary by CodeRabbit
WalkthroughComments in the CodSpeed workflow now describe runner and CodSpeed prerequisites, fork pull request approval guidance, the configured fork pull request skip, and draft behavior. The workflow logic did not change. ChangesCodSpeed workflow guidance
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Other Suggested labels: Merge Risk: ⚪ Minimal · up to This change updates only workflow comments, so CodSpeed job behavior stays the same. The comments now explain correctly that the fork pull request skip is not a security boundary and name the settings change that is still needed. The change adds no merge risk; the underlying settings issue remains a separate follow-up. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to This PR changes documentation, not workflow execution or permissions. No introduced or worsened vulnerability was established. However, the claimed organization-member fork execution path depends on approval and runner-access settings that could not be independently verified. Retained concerns Security review detailsSecurity Findings and Attack Paths
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 82.27%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes |
|
The CodSpeed "Performance Analysis" failure here is runner noise, not this change.
|
Refs goceleris/celeris#864. This corrects a security comment. The hole goceleris/celeris#864 describes needs a settings change (below, corrected in rounds 1 and 2), so this does not fix it.
Defect
.github/workflows/codspeed.ymlat 1fe0430 says this about the macro-runner job (:50-51):That is not true.
pull_request, the workflow definition comes from the pull request's merge ref. A fork can delete theif:that skips forks, or add a workflow of its own that targetscodspeed-macro-arm64-graviton-ubuntu-22-04.all_external_contributors), and that policy does not hold an organization member's fork pull request.logs/settings-readonly.log). Their fork pull request can run on the macro runner with no approval.if:is the boundary.celeris's codspeed.yml was corrected for the same claim under celeris#725.
The header's "Until an organization owner allows public repositories in the Default runner group ... this job waits in the queue" (:17-19) is also stale. All three prerequisites were done on 2026-09-26 (celeris#690). Round 1 reads them from the API (
fix-r1/scripts/settings-readonly-r1.sh, logfix-r1/logs/settings-readonly-r1.log, under the lane evidence dirlanes-20261003/CI1/):CodSpeedHQ/action@*is on this repository's allow-list (gh api repos/goceleris/loadgen/actions/permissions/selected-actions).CodSpeed Runnerwith the labelcodspeed-macro-arm64-graviton-ubuntu-22-04.admin:org, which this lane's token lacks (403).Fix
Comments only. The header now says:
if:does;.github/);The
if:is unchanged. It already skips every fork shape, a deleted fork included:head.repo.full_name == github.repositoryis false whenhead.repois null.Check
Truth table (lane evidence
lanes-20261003/CI1/). It evaluates this file's realif:with act's GitHub-expression interpreter. Round 0:tests/exprtable,scripts/controls-864.sh,logs/864-summary.log. Round 1 re-ran it on today's mains and this PR's unchanged head, with the same rows for this file:fix-r1/tests/exprtable,fix-r1/scripts/controls-864-r1.sh,fix-r1/logs/864-r1-summary.log.fix-r1/logs/864-r1-F-ctl-codspeed-unsafe-fork-check.log; round 0logs/864-F-ctl3-codspeed-unsafe-fork-check.log) rewrites the guard as!github.event.pull_request.head.repo.fork. The deleted-fork row then runs, which shows the table can catch a guard that is not null-safe.go tool -modfile=.github/tools/go.mod actionlint).Cost
None (comments).
Settings recommendation for the maintainer (goceleris/celeris#864), corrected in rounds 1 and 2
The full text, with its evidence, is on goceleris/celeris#864: issuecomment-5965624939. Round 2 added the second bullet of the standing rule, there and here.
The version first posted here, and on goceleris/celeris#864 as issuecomment-5965058060, got option a and rule c wrong.
CLUSTER_SSH_KEY,RUNNER_PAT,TS_OAUTH_CLIENT_ID,TS_OAUTH_SECRETandDOCS_DISPATCH_TOKEN.main.Recommended: make WdnLiu an outside collaborator.
contributors. Check it withgh api repos/goceleris/celeris/collaborators/WdnLiu/permission. If it did not carry over, grant it again withgh api -X PUT repos/goceleris/celeris/collaborators/WdnLiu -f permission=push.Not recommended: write on probatorium, unless the cluster secrets first move into an environment limited to
mainwith required reviewers.Standing rule:
all_external_contributorsexempts more than organization members: "All users that are not a member or owner of this repository and not a member of the organization will require approval to run workflows." Nothing read so far says whether a read collaborator counts as "a member of this repository".all_external_contributorson all four public repositories..github/.Check after the change. The runner-group lines need a token with
admin:org.gh api orgs/goceleris/members: only the maintainers.gh api orgs/goceleris/outside_collaborators: includes WdnLiu.gh api repos/goceleris/celeris/collaborators/WdnLiu/permission:write.gh api repos/goceleris/<repo>/actions/permissions/fork-pr-contributor-approvalon celeris, loadgen, probatorium and docs:all_external_contributors.gh api orgs/goceleris/actions/runner-groups: Default hasvisibilityselected.gh api orgs/goceleris/actions/runner-groups/1/repositories: celeris and loadgen only.Optional, with no settings change: a pre-job hook (
ACTIONS_RUNNER_HOOK_JOB_STARTED) on the cluster runners that refuses forkpull_requestjobs.Nothing was changed. The facts come from read-only calls:
fix-r1/scripts/settings-readonly-r1.sh, logfix-r1/logs/settings-readonly-r1.log. The approval-policy wording comes fromreview-perf-api-security-r1/fresh/scripts/approval-docs.sh, logreview-perf-api-security-r1/fresh/logs/approval-docs.log. Both paths are under the lane evidence dirlanes-20261003/CI1/.Two expressions that look null-safe and are not.
github.event.pull_request.head.repo.fork == falseand!github.event.pull_request.head.repo.forkare both true for a pull request whose fork was deleted.head.repois null, and GitHub's loose equality turns null into 0 and false into 0.head.repo.full_name == github.repository, which is false for null. Keep that form.Review (round 2)
Two reviews of 11c61f6 found nothing wrong in this PR's change. The head is still 11c61f6: this round changes only this text.
pr-fork-same-name-owner-casetests a look-alike owner (goceleris-fork), not a case variant.pr-fork-look-alike-ownerin round 2's copy of the table. This body already called it that.Truth table, round 2 (
fix-r3/tests/exprtable,fix-r3/scripts/controls-864-r3.sh, summaryfix-r3/logs/864-r3-summary.log, under the lane evidence dir). It ran on today's mains (celeris fa76fe6, probatorium 3f3a403, loadgen 1fe0430, docs 30f9bcc) and on this head. It now includes the review's adversarial rows for this file:if:gives the same results as the table above.full_name, a null or emptyfull_name, a fork that reportsfork: false, and a fork whose name extends this repository's: all skipped.!github.event.pull_request.head.repo.fork. Four of those rows then run, as does the deleted-fork row, so the table still catches a guard that is not null-safe.