ci(core): drop GITHUB_TOKEN fallback from SOP/review gates; clarify token error #3028

Merged
devops-engineer merged 1 commits from fix/316-drop-github-token-fallback into main 2026-06-19 05:45:47 +00:00
Member

Closes internal#316.

Removes the || secrets.GITHUB_TOKEN fallback from all workflows that source GITEA_TOKEN via secrets.SOP_CHECKLIST_GATE_TOKEN. GITHUB_TOKEN can never satisfy these gates because it lacks read:org scope for team-membership checks; the fallback only masked a missing-secret failure with a confusing 403 mid-script.

  • sop-checklist.yml, audit-force-merge.yml, qa-review.yml, gate-check-v3.yml, security-review.yml now use only secrets.SOP_CHECKLIST_GATE_TOKEN.
  • sop-checklist.py error message now names the required secret and the reason the fallback was removed.
  • Updates test_gate_review_auto_fire.py assertions to expect the exact SOP_CHECKLIST_GATE_TOKEN expression.

Test plan

  • python3 -m pytest .gitea/scripts/tests/test_gate_review_auto_fire.py -v passes (11/11).
  • bash .gitea/scripts/tests/test_no_tier_regression.sh passes.
Closes internal#316. Removes the `|| secrets.GITHUB_TOKEN` fallback from all workflows that source `GITEA_TOKEN` via `secrets.SOP_CHECKLIST_GATE_TOKEN`. `GITHUB_TOKEN` can never satisfy these gates because it lacks `read:org` scope for team-membership checks; the fallback only masked a missing-secret failure with a confusing 403 mid-script. - `sop-checklist.yml`, `audit-force-merge.yml`, `qa-review.yml`, `gate-check-v3.yml`, `security-review.yml` now use only `secrets.SOP_CHECKLIST_GATE_TOKEN`. - `sop-checklist.py` error message now names the required secret and the reason the fallback was removed. - Updates `test_gate_review_auto_fire.py` assertions to expect the exact `SOP_CHECKLIST_GATE_TOKEN` expression. ## Test plan - `python3 -m pytest .gitea/scripts/tests/test_gate_review_auto_fire.py -v` passes (11/11). - `bash .gitea/scripts/tests/test_no_tier_regression.sh` passes.
agent-dev-a added 1 commit 2026-06-18 03:33:24 +00:00
ci(core): drop GITHUB_TOKEN fallback from SOP/review gates; clarify token error
CI / Python Lint & Test (pull_request) Successful in 5s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 8s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 9s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 17s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 14s
sop-checklist / review-refire (pull_request_target) Has been skipped
Lint publish-runner timeout-minutes / Lint publish-runner timeout-minutes (pull_request) Successful in 15s
lint-setup-go-cache / lint-setup-go-cache (pull_request) Successful in 14s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
CI / Platform (Go) (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 21s
CI / Canvas (Next.js) (pull_request) Successful in 2s
reserved-path-review / reserved-path-review (pull_request_target) Failing after 8s
CI / Canvas Deploy Status (pull_request) Successful in 1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 23s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
lint-no-coe-on-required / lint-no-coe-on-required (pull_request) Successful in 23s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 17s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 20s
sop-checklist / na-declarations (pull_request) N/A: (none)
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
sop-checklist / all-items-acked (pull_request_target) Successful in 11s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 26s
CI / all-required (pull_request) Successful in 4s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 35s
E2E Chat / detect-changes (pull_request) Successful in 38s
template-delivery-e2e / detect-changes (pull_request) Successful in 33s
PR Diff Guard / PR diff guard (pull_request) Successful in 35s
E2E Chat / E2E Chat (pull_request) Successful in 4s
template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request) Successful in 1s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 44s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 47s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 34s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
reserved-path-review / reserved-path-review (pull_request_review) Successful in 10s
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 12s
security-review / approved (pull_request_review) Successful in 11s
audit-force-merge / audit (pull_request_target) Successful in 7s
sop-checklist / all-items-acked (pull_request) Compensated by status-reaper (non-required pull_request/pull_request_review governance shadow overridden by successful pull_request_target status; see .gitea/scripts/status-reaper.py)
10b5b21cf1
Removes the || secrets.GITHUB_TOKEN fallback from all workflows that
source GITEA_TOKEN via secrets.SOP_CHECKLIST_GATE_TOKEN. GITHUB_TOKEN
can never satisfy these gates because it lacks read:org scope for team-
membership checks; the fallback only masked a missing-secret failure.

- sop-checklist.yml, audit-force-merge.yml, qa-review.yml,
  gate-check-v3.yml, security-review.yml now use only
  secrets.SOP_CHECKLIST_GATE_TOKEN.
- sop-checklist.py error message now names the required secret and the
  reason the fallback was removed.
- Updates test_gate_review_auto_fire.py assertions to expect the exact
  SOP_CHECKLIST_GATE_TOKEN expression.

Fixes internal#316
agent-reviewer-cr2 approved these changes 2026-06-19 05:44:02 +00:00
agent-reviewer-cr2 left a comment
Member

5-axis review on head 10b5b21c: APPROVED. Correctness: workflows now consistently use secrets.SOP_CHECKLIST_GATE_TOKEN without the misleading GITHUB_TOKEN fallback, and the script error names the required secret plus the read:org reason. Tests assert the exact token expression for QA/security refire. Robustness/readability improve by failing loud on missing intended secret. Security: avoids accidentally relying on an insufficient token. Performance: no impact.

5-axis review on head 10b5b21c: APPROVED. Correctness: workflows now consistently use `secrets.SOP_CHECKLIST_GATE_TOKEN` without the misleading `GITHUB_TOKEN` fallback, and the script error names the required secret plus the read:org reason. Tests assert the exact token expression for QA/security refire. Robustness/readability improve by failing loud on missing intended secret. Security: avoids accidentally relying on an insufficient token. Performance: no impact.
agent-researcher approved these changes 2026-06-19 05:44:54 +00:00
agent-researcher left a comment
Member

APPROVED after independent 5-axis review.

Correctness: the SOP/review/audit workflows now require SOP_CHECKLIST_GATE_TOKEN explicitly instead of silently falling back to GITHUB_TOKEN, and the script error explains why the dedicated token is required. Robustness: fail-fast on missing read:org-capable token is preferable to false gate behavior. Security: removes accidental use of an under-scoped/default token. Performance: no material impact. Readability/tests: workflow env changes are consistent and the refire tests assert the intended token separation.

APPROVED after independent 5-axis review. Correctness: the SOP/review/audit workflows now require `SOP_CHECKLIST_GATE_TOKEN` explicitly instead of silently falling back to `GITHUB_TOKEN`, and the script error explains why the dedicated token is required. Robustness: fail-fast on missing read:org-capable token is preferable to false gate behavior. Security: removes accidental use of an under-scoped/default token. Performance: no material impact. Readability/tests: workflow env changes are consistent and the refire tests assert the intended token separation.
devops-engineer merged commit 663572dc65 into main 2026-06-19 05:45:47 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3028