security: establish trusted authority controller - #20
Merged
Merged
Conversation
stacknil
marked this pull request as ready for review
September 16, 2026 04:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The frozen commit-intrinsic worker defines
P_v(H), but assumes that a trusted Python process has already imported the reviewed control code. This PR establishes the missing trusted bootstrap/controller boundary immediately above that worker.Invariant
Authority evaluation is reachable only after an absolute CPython 3.12.3 Linux x86_64 interpreter enters with
-I -S -B, an exact fixed environment, trusted control-root imports, fixed repository identity, exactrefs/pull/<n>/head == H, the fixed v1 bundle identity, and non-overlapping verifier-owned roots.Infrastructure, runtime, acquisition, worker-infrastructure, orchestration, or cleanup failures produce
INFRASTRUCTURE_REFUSALwith no authority result.Design decision
/usr/bin/env -i, and invokes an absolute trusted Python path.1130304545, owner ID219124580, the canonical HTTPS remote, epochv1, and bundle digest6f25ebb773ce1453e8de623bca5aaecc936f1f188288f8df20aedeadb3bf4612./usr/bin:/bin; lookup must select/usr/bin/gitbefore the frozen acquisition module runs.Hremains data and never enterssys.path.Threat/failure model
The future trust root is the GitHub-hosted runner plus an immutable reviewed workflow SHA and these reviewed bootstrap/controller files. This code does not claim to neutralize loader or shell-startup influence that occurred before its own process began.
It defends after that boundary against hostile Python/home/XDG/pip/Repo Sentinel/virtualenv/path state, fake Python/Git, shadow stdlib and startup hooks, caller-selected repository/policy/control inputs, ref movement, target-code execution, raw diagnostic injection, and stale success after cleanup failure.
Rejected alternatives
H. Rejected because evaluated repository content must remain data.Compatibility
No workflow, GitHub App, OIDC, signer, Commit Status, branch/ruleset, acquisition, reader, materializer, worker, scanner, baseline, policy bundle, or report-schema behavior changes.
Validation
Completed on the submitted implementation:
/usr/bin/python3.12;/usr/bin/git, Git 2.43.0;Production-style HTTPS evidence:
P_v(H)probe succeeded on reviewed headcd4b181c82774870267f72097405def2ea3abac6;AUTHORITY_RESULT/SCANNER_FINDING, 262 total files, 252 scanned, 10 policy-excluded;83e4bf1e4594b593543993e497edeb39a7fcab77f753200396b6ae6278d12fbb;79091fad515a6d5399a63401a8f17f0ad0f6e2a6c9f5c45af7453463213fe200;6cee46c37e3b4ac9e42dc1c499d16869fcc34e10differs only by a test assertion; exact-head retries currently fail closed at acquisition because the local sanitized network path is intermittently resetting/stalling. No stale authority result is returned.Exact-head configured CI:
SCANNER_FINDING;Pending:
Rollback
This PR activates no workflow and publishes no status. Rollback is deletion of the four added files. After future activation, rollback must select a previously reviewed controller/bootstrap SHA rather than code or policy from target
H.Explicit exclusions
This PR does not implement a GitHub App, OIDC verification, signer service, Commit Status publication, required-check activation, branch/ruleset changes, or a production
pull_request_targetworkflow.