Repository navigation
Conversation
Extend the agentrust-io#782 policy-first repair to identity, audit and session-store refusals. Preserve early public-key measurement and document the later port-bind boundary. Add paired refusal/recovery controls and simulator cases. Prepared with OpenAI Codex. Refs agentrust-io#782. Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Contributor
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dinakarjs
marked this pull request as ready for review
November 8, 2026 14:06
dinakarjs
requested review from
a team,
carloshvp,
qubeena07,
rajnisht7 and
zohebk8s
as code owners
November 8, 2026 14:06
This branch has not been deployed
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.
A refused first start could persist a sealed signing key bound to rejected inputs, causing the corrected configuration to fail on restart. Provisioning/unseal now occurs after all
run_startupchecks. Earlier public-key discovery, measurement and attestation remain necessary.Current head:
0beb5a3434c3dffa9c77f11b61ba6bea1e2ccd69. This is our second active effort, ready for independent review under #782. Rajnish retains the landing decision.All six hosted Linux/Windows Python 3.11–3.13 test jobs and governance pass. Each Linux job passed 2,778 tests with 29 skips and three subtests, including four new swtpm refusal/recovery cases. Eight software controls fail behaviorally on original startup.py. Documentation, CodeQL, confinement, Docker and bounded fuzz checks also pass; remote and validated local trees match.
Limits: measurement, locking and other startup effects still occur earlier; this is not transactional startup or an atomic measured-policy snapshot. Port binding occurs after return and remains outside this boundary. Existing bad-digest stores may need documented reseal. Simulator evidence does not establish production recovery.
Decision: independent review of this head; requested reviewers now appear in current metadata. No self-approval or merge.
Prepared with OpenAI Codex; DCO-signed code history retained. This description update changes no source or review head.
Historical description and validation snapshots (superseded by current status above)
What and why
A first start can persist a sealed signing key before later validation refuses the configuration. Correcting that configuration then changes the measured digest and prevents the next start from unsealing. Defer provisioning/unseal until every check in
run_startupsucceeds, while keeping public-key discovery, measurement and attestation in their existing order.Refs #782. Extends our earlier dinakarjs#3 policy-first candidate using Yatsuiii's additional reproduction. #779 has merged; this is the proposed upstream home for the revised correction. Rajnish retains issue ownership and the landing decision. The separate lifecycle controls in dinakarjs#5 are not bundled here.
Security impact and compatibility
Invalid policy, identity, audit-store and session-store inputs cannot trigger new key provisioning through this path. Sealing remains opt-in; ephemeral-key behavior and existing-store mismatch refusal remain. Earlier validation errors now take precedence over sealing errors; two simulator expectations are updated accordingly. This also carries #782's empty-owner-password warning and configuration-digest wording correction.
Measurement/NV extension, store locking and other startup side effects still occur before the seal point. This is not transactional startup or atomic measurement/loaded-policy binding. The caller binds the network port after return, so a later bind failure can still leave a provisioned key. Existing bad-digest stores may be recovered by the documented reseal operation where appropriate; rotation is not asserted to be necessary.
Validation
Validated tree
44a4ce6b56dfbc537211d9aab86bf4236dd7d010, published as0beb5a3434c3dffa9c77f11b61ba6bea1e2ccd69, Linux/Python 3.12.14:Local native dependency setup was unavailable; the hosted validation update below supplies the subsequent simulator evidence. No hardware, recovery-in-production or merge-completion claim.
Hosted validation update
CI run 42487782062 passed all six Linux/Windows Python 3.11/3.12/3.13 test jobs and governance on the published head. Each Linux job reports 2,778 passed / 29 skipped / 3 subtests; Python 3.12 Windows reports 2,706 passed / 97 skipped / 3 subtests. Linux logs explicitly show all four new swtpm refusal/recovery cases and both changed error expectations passing. This resolves the local simulator execution gap; it is simulator evidence, not host-TPM or production recovery evidence.
Documentation, CodeQL, confinement-reference and Docker workflow checks also pass. ClusterFuzzLite also passed; the job reports no reportable crashes in its bounded run. Ready for independent owner/maintainer review; Rajnish's landing decision remains. Reviewer-assignment API returned 403, so the handoff is recorded in #782 rather than claiming a formal assignment.
DCO / assistance