# Risk-tiered human review (SDLC-HOSTING-SOC2-PLAN-2026-07 §3.1). Everything
# else in this repo keeps the automated-gates + self-approval flow; these
# paths are the ones where a defect is a signing bug, an auth bypass, or an
# unreviewable pipeline change, so they require a second, non-authoring human
# — @sengol-io/high-risk-reviewers — rather than passing on gates alone.
# The team is created and populated by the founder; until then GitHub reports
# these entries as unowned rather than blocking, so add the team promptly.
# This file owns itself: GitHub reads ownership from the base branch, so
# without that entry a PR editing only CODEOWNERS could drop any mapping
# below with no owner asked. Approval is blocking only once the team has
# write access and "Require review from Code Owners" is on for main.

/sengol/core/                          @sengol-io/high-risk-reviewers
# Every store under sengol/api canonicalises, signs and persists evidence;
# the pattern catches new ones without a CODEOWNERS edit.
/sengol/api/*_store.py                 @sengol-io/high-risk-reviewers
# The governance stores define the signing, verification and retention
# behaviour the Postgres classes inherit; a change here reaches evidence.
/sengol/governance/*_store.py          @sengol-io/high-risk-reviewers
# app.py selects and constructs the signing backend and every evidence
# store, and hosts POST /v1/audit/ingest, which decides what enters the HMAC.
/sengol/api/app.py                     @sengol-io/high-risk-reviewers
/sengol/api/signing_kms.py             @sengol-io/high-risk-reviewers
/sengol/api/sink.py                    @sengol-io/high-risk-reviewers
# The other evidence sinks, same 2xx-only-acks contract as sink.py above.
/sengol/api/*_sink.py                  @sengol-io/high-risk-reviewers
/sengol/api/countersign.py             @sengol-io/high-risk-reviewers
/sengol/api/evidence_keys.py           @sengol-io/high-risk-reviewers
# Signing-key lifecycle: rotate and revoke.
/sengol/api/v1/keys.py                 @sengol-io/high-risk-reviewers
/sengol/api/anchor.py                  @sengol-io/high-risk-reviewers
# Verification and signing outside the stores: offline_verify recomputes the
# HMAC and Ed25519 over bundle bytes, and is what a forged bundle must fool;
# report_base signs evidence packs from keyring material.
/sengol/governance/offline_verify.py   @sengol-io/high-risk-reviewers
/sengol/governance/report_base.py      @sengol-io/high-risk-reviewers
/sengol/governance/_license.py         @sengol-io/high-risk-reviewers
/sengol/governance/trusted_keys/       @sengol-io/high-risk-reviewers
/sengol/api/v1/users.py                @sengol-io/high-risk-reviewers
/sengol/api/v1/auth.py                 @sengol-io/high-risk-reviewers
/sengol/api/v1/rbac.py                 @sengol-io/high-risk-reviewers
/sengol/api/v1/scim.py                 @sengol-io/high-risk-reviewers
/sengol/api/auth_oidc.py               @sengol-io/high-risk-reviewers
/sengol/api/v1/saml.py                 @sengol-io/high-risk-reviewers
/sengol/api/v1/break_glass.py          @sengol-io/high-risk-reviewers
/sengol/api/middleware/auth.py         @sengol-io/high-risk-reviewers
# Boundaries that decide whether a request is authenticated or authorized:
# the CSRF check on cookie sessions, the forced-password-change gate, the
# password verify and breach-check paths, the sk_ -> JWT exchange, scope
# resolution and its grants, separation of duties, and dual-control erasure.
/sengol/api/session_cookie.py          @sengol-io/high-risk-reviewers
/sengol/api/middleware/password_change_gate.py @sengol-io/high-risk-reviewers
/sengol/api/v1/passwords.py            @sengol-io/high-risk-reviewers
/sengol/api/v1/breached_passwords.py   @sengol-io/high-risk-reviewers
/sengol/api/_sk_auth.py                @sengol-io/high-risk-reviewers
/sengol/api/v1/scoping.py              @sengol-io/high-risk-reviewers
/sengol/api/v1/access.py               @sengol-io/high-risk-reviewers
# The two-person control's decision function and the routes that configure
# it: weakening a tier is itself a control relaxation. storage_mode's
# assert_auth_configured is the only thing stopping a durable deployment
# booting with require_scope allowing everything. otlp_ingest decides agent
# identity inline and binds evidence to a caller-asserted id.
/sengol/governance/sod.py              @sengol-io/high-risk-reviewers
/sengol/api/v1/sod.py                  @sengol-io/high-risk-reviewers
/sengol/api/v1/sod_approvals.py         @sengol-io/high-risk-reviewers
/sengol/api/postgres_sod_approval_store.py @sengol-io/high-risk-reviewers
/sengol/api/v1/intakes.py               @sengol-io/high-risk-reviewers
/sengol/api/storage_mode.py            @sengol-io/high-risk-reviewers
/sengol/api/otlp_ingest.py             @sengol-io/high-risk-reviewers
/sengol/api/sod_authority.py           @sengol-io/high-risk-reviewers

# The SoD primitives above are owned, but the callers that USE them to make
# the decision were not: a PR could weaken an approval predicate, or change
# what claims go into signed evidence, without the non-authoring review this
# file applies to comparable paths. Codex found three of these on PR #1; the
# import-derived test in tests/scripts/test_codeowners.py found the rest and
# is what keeps the list complete from here.
/sengol/api/v1/lifecycle.py            @sengol-io/high-risk-reviewers
# Confirms, promotes, waives and retires production failures/regression
# cases through enforce_sod — same reasoning as lifecycle.py above. The
# basename-coverage test requires every other regression.py to be owned
# too, once one is listed — sengol/cli/regression.py and
# sengol/build/regression.py neither import an SoD primitive nor construct
# a decision record themselves, but share the name.
/sengol/api/v1/regression.py           @sengol-io/high-risk-reviewers
/sengol/cli/regression.py              @sengol-io/high-risk-reviewers
/sengol/build/regression.py            @sengol-io/high-risk-reviewers
# The deploy-gate routes: revoke, verify and check-authorization decide the
# same accepted-set outcome as lifecycle.py above and are SoD-enforced too.
/sengol/api/v1/lifecycle_gate.py       @sengol-io/high-risk-reviewers
# Computes which certifications count for an agent — the accepted-set rule
# every deploy-gate and certification-history read derives its answer from.
/sengol/governance/accepted_set.py     @sengol-io/high-risk-reviewers
# Loads that rule's inputs and re-checks each certification's run against
# its signed run_payload_sha256 before a certification may count (ADR-0020).
/sengol/api/accepted_set_loader.py     @sengol-io/high-risk-reviewers
# Re-runs the accepted-set check for a call whose outcome is minted late
# (orphan sweep, phase 3) — same certification-count decision as the loader
# above, reached from a different call site.
/sengol/api/ingest_recheck.py          @sengol-io/high-risk-reviewers
# Computes the image execution-config hash a run signs and verify matches,
# and refuses a multi-platform index reference (ADR-0021).
/sengol/behaviour/image_config.py      @sengol-io/high-risk-reviewers
/sengol/api/v1/certification_lineage.py @sengol-io/high-risk-reviewers
/sengol/api/v1/judge_build.py          @sengol-io/high-risk-reviewers
/sengol/api/v1/judge_challenge.py      @sengol-io/high-risk-reviewers
/sengol/api/authority_lifecycle.py     @sengol-io/high-risk-reviewers
/sengol/api/webhook_drainer.py         @sengol-io/high-risk-reviewers

# Route modules are not where the decision is made. These implementations
# construct and ingest the signed decision record itself, and a PR could
# change an approval predicate here while every route file above stays
# untouched. Codex found the first two on PR #1; the construction-based test
# found a disposition module that mirrored authority_lifecycle.py.
/sengol/gateway/core.py                @sengol-io/high-risk-reviewers
/sengol/judge_build/promote.py         @sengol-io/high-risk-reviewers
/sengol/api/v1/audit_erasure.py        @sengol-io/high-risk-reviewers
/sengol/api/v1/dataset_rows_erasure.py @sengol-io/high-risk-reviewers
# Applies a governance change and its log line in one locked transaction;
# a defect here lets a control change commit without being logged (ADR-0024).
/sengol/api/governance_txn.py          @sengol-io/high-risk-reviewers
# The authorization engine: every ALLOW or BLOCK it decides is minted and
# signed, and the gateway:mint routes sign values the caller asserts.
/sengol/runtime/authorization.py       @sengol-io/high-risk-reviewers
/sengol/api/v1/authorization.py        @sengol-io/high-risk-reviewers
# The policy model the engine decides against, and the route that upserts and
# deletes those policies when an agent is quarantined or released. Neither is
# matched by the two entries above: three files share the name authorization.py
# and only two of them live on a path listed here.
/sengol/governance/authorization.py    @sengol-io/high-risk-reviewers
/sengol/api/agent_quarantine.py        @sengol-io/high-risk-reviewers
# Everything that mints or confers a credential the API then trusts: browser
# SSO JWTs, device grants, agent registration secrets, `sk_` tokens, the
# second factor, the CI OIDC trust decision, and group/platform role conferral.
/sengol/api/v1/sso.py                  @sengol-io/high-risk-reviewers
/sengol/api/v1/device_auth.py          @sengol-io/high-risk-reviewers
/sengol/api/v1/agents.py               @sengol-io/high-risk-reviewers
/sengol/api/v1/github_oidc.py          @sengol-io/high-risk-reviewers
/sengol/api/v1/totp.py                 @sengol-io/high-risk-reviewers
/sengol/api/v1/groups.py               @sengol-io/high-risk-reviewers
/sengol/api/v1/platform_admin.py       @sengol-io/high-risk-reviewers
/sengol/api/_sk_format.py              @sengol-io/high-risk-reviewers
/alembic/                              @sengol-io/high-risk-reviewers
/.github/workflows/                    @sengol-io/high-risk-reviewers
/.github/CODEOWNERS                    @sengol-io/high-risk-reviewers
/.grype.yaml                           @sengol-io/high-risk-reviewers
/scripts/grype_gate.py                 @sengol-io/high-risk-reviewers
/scripts/npm_audit_gate.py             @sengol-io/high-risk-reviewers
/scripts/plan_destroy_gate.py          @sengol-io/high-risk-reviewers
/tests/scripts/                        @sengol-io/high-risk-reviewers
/Dockerfile                            @sengol-io/high-risk-reviewers
/terraform/                            @sengol-io/high-risk-reviewers
/helm/                                 @sengol-io/high-risk-reviewers
