fix(security): remove SOP_FAIL_OPEN bypass branches from sop-tier-check.sh (HIGH) #2362
Reference in New Issue
Block a user
Delete Branch "fix/sop-tier-check-remove-fail-open-core"
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?
The workflow already removed SOP_FAIL_OPEN env (fix/core-ci-fail-closed, 2026-06-05), but the script still carried executable bypass branches that would exit 0 when the env was set. Remove all of them so every infra fault now fails closed (exit 1) with a loud ::error::, exactly like a real SOP-6 violation.
The workflow already removed SOP_FAIL_OPEN env (fix/core-ci-fail-closed, 2026-06-05), but the script still carried executable bypass branches that would exit 0 when the env was set. Remove all of them: - jq-install failure block - token whoami failure block - HEAD_SHA fetch failure block - /orgs/{o}/teams fetch failure block - /pulls/{n}/reviews fetch failure block Every infra fault now fails closed (exit 1) with a loud ::error::, exactly like a real SOP-6 violation.5-axis review on current head
bc7c45f3d6. Correctness/security: the SOP_FAIL_OPEN bypass branches are removed from jq install, token whoami, PR head lookup, org team fetch, and reviews fetch fault paths; genuine infra/auth/API faults now exit 1 loudly instead of greening. Robustness: successful normal runs are not made stricter beyond requiring those API calls and jq to actually work; existing jq/curl parsing still uses explicit error logging and restores set -e around the reviews fetch. Performance/readability: narrow shell-only removal of bypass code. Combined status is currently red from governance review/checklist gates, but the fail-closed change itself is correct and this approval should satisfy the review gate path. Approved.APPROVED: verified on current head
bc7c45f3d6. The SOP_FAIL_OPEN bypass branches are removed from sop-tier-check.sh: jq-install failure, token identity failure, PR-head fetch failure, org-teams fetch failure, and reviews fetch failure now all exit 1 loudly. The diff is limited to removing the bypass/comments, so the normal success path remains unchanged. Required core contexts are green and mergeable=true. Local targeted SOP tests could not run in this container because jq is not installed, but live required CI is green.