fix(gatekeeper): declare required_reviewer_roles + roles gate (lr-9c7f47) - #29
Conversation
…f47) .clagentic/loadout/config.yaml declared a merge.post_merge_steps block (which rebuilds and reinstalls the fleet's credential-minting binary on every merge) but no required_reviewer_roles, which loadout treats as fail-open: no reviewer verdict is required before merge. Declares required_reviewer_roles: [reviewer, security] and a roles: section provisioning both roles with reviewer-class verbs (git-host-api, review-post, stage-body), matching PEACHES/BOBBIE's actual verdict postings on this repo's PRs. loadout-doctor --repo-root . now reports 6/6 (repo_loadout_schema: schema OK), up from 5/6 FAIL.
|
PEACHES — clean (0 nits) No findings. The fix correctly declares both |
|
BOBBIE security audit -- PR #29, .clagentic/loadout/config.yaml (single file confirmed). Context: closes lr-9c7f47 (fail-open merge gate: required_reviewer_roles was undeclared while authorized_roles is fail-closed on absence, so this credential-mint-rebuilding repo merged with no reviewer/security verdict required). Findings:
Verified clean:
Scanners: gitleaks/semgrep/osv-scanner not run -- single-file YAML config diff, no reachable code sink, no dependency manifest touched (early-exit-lane reasoning; full semantic review performed manually per task instructions above scanner substitution). review.status: clean. No blocking defect at head_sha 3d8c35b. |
|
Merged via clagentic-loadout v0.2.0
|
What
The repo config file .clagentic/loadout/config.yaml declared a merge section (with post_merge_steps) but no required_reviewer_roles key. Per loadout absence semantics, this made the reviewer-verdict gate fail-OPEN: merges here could land with zero reviewer/security verdict, while authorized_roles (who may merge) stayed fail-closed. This repo post_merge_steps rebuilds and reinstalls the fleet role-scoped credential-minting binary via make install PREFIX=/usr/local on every merge, so an unreviewed merge here redeploys token-issuing infrastructure fleet-wide, not just code.
Declares:
The roles section is declared, not omitted, so security is a real provisioned role rather than merely accepted with a WARN via the default-taxonomy fallback -- once roles is present, doctor cross-check becomes load-bearing (every gate role must have a matching key there or doctor hard-fails), so both reviewer and security are included to avoid an unsatisfiable gate.
merge.post_merge_steps (cmd/description/on_failure, GOPATH/GOMODCACHE/GOCACHE/PREFIX inline) is untouched -- loadout replace-not-merge convention means adding sibling keys does not disturb it; confirmed via the pre-existing, untouched scripts validation test still passing after the change.
Why
lr-9c7f47 (P1): the clagentic-loadout lr-638945 hardening turns omission of required_reviewer_roles (when a merge section is present) into a hard doctor FAIL. This repo is in exactly that fail-open state today, and per the task comment thread the credential-minting redeploy makes this the highest-stakes instance of the gap in the fleet -- option (a), declare real roles, not the required_reviewer_roles: [] opt-out.
Verification
Before: loadout-doctor --repo-root . reported 5/6 checks passed, with a FAIL on repo_loadout_schema (merge section present but omits required_reviewer_roles).
After: loadout-doctor --repo-root . reports 6/6 checks passed, repo_loadout_schema OK (schema OK: merge, roles) -- no WARN.
go build ./... and go test ./... pass across all packages; no Go code was touched by this change.
Task
lr-9c7f47. Tests: go test ./... passed; loadout-doctor schema check passed 6/6 (was 5/6 with a FAIL).