You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1d5dfd6
Browse filesBrowse the repository at this point in the historyBrowse files
ci(release): the ruleset probe gets the canon authz job; stop claiming which App permission exposes bypass_actors (CR-245 F1, round 2)
Fresh sol + argon reads of the probe commit 6adae66:
- P1 (both): test_gcp_sites_reject_cross_class_routes asserted 29 routed GCP sites; the probe workflow adds
one, and the authz job it now carries adds another, so the derived count is 31 (ci 5, ci-post 8, native 3,
corpus 3, subset 2, docs 2, docs-post 2, release 3 + prebuilt matrix site, promotion 1, probe 2). The
PF_CI_LABELS subset stays 15.
- P2 (sol): release-ruleset-probe.yml had no authz job. It now has the canonical authz job, the probe job
needs it and carries the canonical step guards; the preflight pin and its mutation controls refuse a probe
workflow without authz or without the dependency. The App-token mint step is unchanged and still
byte-identical to release.yml's (the probe must use the same token path as the bump).
- P2 (sol): docs/ci.md, the release.yml comment (comment lines only) and the binding release-gate test stated
as fact that the App permission administration: read exposes bypass_actors. That is not verified: GitHub's
documentation says bypass_actors is returned only to a caller with write access to the ruleset, and what an
installation token sees on an inherited organization ruleset is exactly what the probe measures. All three
now say what is true (the gate needs bypass_actors visible on every branch ruleset in the inventory; if the
release App token cannot see them the bump is refused; the probe reports whether it can), and the test pins
that wording, so it fails if the unsupported claim comes back.
- P3 (sol): docs/ci.md said every probe refusal names an endpoint; only API/response failures do. Narrowed.
Names the docs/ci.md sentences this commit removes or rewrites, all introduced by a8b1276 ("ci(release): the
bump exemption also requires that only the release App can push to main"), as a deliberate revert of their
unverified claim:
"The gate relies on the release App permission `administration: read` to read `bypass_actors`."
"The App installation has that permission and `contents: write`; the workflow-level `contents: write`
setting scopes GITHUB_TOKEN and does not grant App permissions."
"Tokens without administration access may receive a ruleset response with `bypass_actors` omitted; a
missing field refuses, and the guard never assumes an unreadable list is empty or App-only."
"Removing this App permission makes every release-bump exemption refuse."
They are replaced by the verified wording above; the guard behaviour (a missing bypass_actors field refuses)
is unchanged.
Open decision, not changed here: the probe and release.yml use the tag references
actions/create-github-app-token@v1 and actions/checkout@v4 where the CI canon wants full-SHA pins; the probe
keeps the same mint as the bump on purpose.
Lane: ci-fu-cr486q (Codex gpt-6.1-sol).
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
case "$perm" in admin|maintain|write) ;; *) fail "workflow_run triggering actor does not have write permission" ;; esac ;;
53
+
esac ;;
54
+
pull_request)
55
+
[ "$HEAD_REPO" = "$REPO" ] || fail "pull request from another repository (${HEAD_REPO:-unknown})"
56
+
[ "$HEAD_IS_FORK" = "false" ] || fail "pull request from a fork"
57
+
case "$ASSOCIATION" in
58
+
OWNER|MEMBER|COLLABORATOR) ;;
59
+
*)
60
+
case " $ALLOWED_BOTS " in
61
+
*" $PR_AUTHOR "*) ;;
62
+
*)
63
+
# A member whose org membership is private shows as CONTRIBUTOR: ask GitHub for the
64
+
# author's permission on this repository; anything but admin/maintain/write (or a
65
+
# failed call) refuses.
66
+
perm=$(gh api "repos/$REPO/collaborators/$PR_AUTHOR/permission" --jq .permission 2>/dev/null || echo none)
67
+
case "$perm" in admin|maintain|write) ;; *) fail "author ${PR_AUTHOR:-unknown} (${ASSOCIATION:-NONE}) has permission '$perm', not write, and is not an allowlisted bot" ;; esac ;;
68
+
esac ;;
69
+
esac ;;
70
+
*) fail "event $EVENT does not run CI (pull_request_target and other events are not allowed)" ;;
71
+
esac
72
+
echo "authz: allowed ($EVENT${PR_AUTHOR:+ by $PR_AUTHOR})" >> "$GITHUB_STEP_SUMMARY"
case "$perm" in admin|maintain|write) ;; *) fail "workflow_run triggering actor does not have write permission" ;; esac ;;
1217
+
esac ;;
1218
+
pull_request)
1219
+
[ "$HEAD_REPO" = "$REPO" ] || fail "pull request from another repository (${HEAD_REPO:-unknown})"
1220
+
[ "$HEAD_IS_FORK" = "false" ] || fail "pull request from a fork"
1221
+
case "$ASSOCIATION" in
1222
+
OWNER|MEMBER|COLLABORATOR) ;;
1223
+
*)
1224
+
case " $ALLOWED_BOTS " in
1225
+
*" $PR_AUTHOR "*) ;;
1226
+
*)
1227
+
# A member whose org membership is private shows as CONTRIBUTOR: ask GitHub for the
1228
+
# author's permission on this repository; anything but admin/maintain/write (or a
1229
+
# failed call) refuses.
1230
+
perm=$(gh api "repos/$REPO/collaborators/$PR_AUTHOR/permission" --jq .permission 2>/dev/null || echo none)
1231
+
case "$perm" in admin|maintain|write) ;; *) fail "author ${PR_AUTHOR:-unknown} (${ASSOCIATION:-NONE}) has permission '$perm', not write, and is not an allowlisted bot" ;; esac ;;
1232
+
esac ;;
1233
+
esac ;;
1234
+
*) fail "event $EVENT does not run CI (pull_request_target and other events are not allowed)" ;;
1235
+
esac
1236
+
echo "authz: allowed ($EVENT${PR_AUTHOR:+ by $PR_AUTHOR})" >> "$GITHUB_STEP_SUMMARY"
0 commit comments