MVP alpha.11: Runtime attestation post handshake gating v0 - #64
Merged
ZebulonRouseFrantzich merged 5 commits intoMay 5, 2026
Conversation
Signed-off-by: Zebulon Rouse-Frantzich <zeb@runecode.org>
Signed-off-by: Zebulon Rouse-Frantzich <zeb@runecode.org>
There was a problem hiding this comment.
Pull request overview
This PR refactors runtime attestation so launch receipts stay TOFU until a later post-handshake step, adds a new PostHandshakeRuntimeAttestationInput seam for evidence construction, and updates broker/artifact handling to persist and reconcile the new attestation state. It touches launcher-side session/attestation flow, launcherbackend evidence/posture derivation, and broker/store projections/tests.
Changes:
- Move attestation construction from launch-time receipts to a new post-handshake attestation input/evidence path.
- Add reconciliation/persistence logic so broker and artifact storage derive authoritative posture from persisted evidence instead of trusting raw receipt fields.
- Expand tests and shared fixtures/helpers around runtime evidence, authoritative-state projection, and audit payload assertions.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
internal/launcherdaemon/runtime_attestation_support.go |
Splits launch-time binding from post-handshake attestation progress and receipt updates. |
internal/launcherdaemon/runtime_attestation_support_test.go |
Adds tests for TOFU-at-launch and validated-session/post-handshake helpers. |
internal/launcherdaemon/runtime_attestation_support_helpers.go |
Moves shared digest/canonicalization/session-proof helper logic into a helper file. |
internal/launcherdaemon/runtime_attestation_support_handshake.go |
Adds secure-session handshake tuple construction and signing helpers. |
internal/launcherdaemon/qemu_runtime_linux.go |
Wires post-hello/post-handshake facts updates into QEMU instance monitoring. |
internal/launcherdaemon/qemu_launch_support_linux.go |
Removes launch-time trusted-attestation population from QEMU receipt building. |
internal/launcherdaemon/qemu_controller_linux.go |
Passes richer launch state through controller startup and adds a binding lifecycle step. |
internal/launcherdaemon/qemu_controller_linux_test.go |
Reworks QEMU attestation tests around fail-closed post-handshake evidence gating. |
internal/launcherdaemon/container_controller_linux.go |
Removes launch-time attestation from container receipts and adds binding lifecycle step. |
internal/launcherdaemon/container_controller_linux_test.go |
Updates container tests for TOFU-at-launch and post-handshake evidence requirements. |
internal/launcherbackend/contract_runtime_evidence.go |
Threads post-handshake attestation input into runtime evidence splitting/building. |
internal/launcherbackend/contract_runtime_evidence_types.go |
Introduces PostHandshakeRuntimeAttestationInput and adds launch-context linkage fields. |
internal/launcherbackend/contract_runtime_evidence_test.go |
Expands evidence tests for post-handshake seams, fail-closed cases, and attested promotion. |
internal/launcherbackend/contract_runtime_evidence_fixtures_test.go |
Normalizes fixtures for launch context, session validation, and post-handshake inputs. |
internal/launcherbackend/contract_runtime_attestation_input.go |
Adds normalization for post-handshake attestation input records. |
internal/launcherbackend/contract_runtime_attestation_input_test.go |
Adds normalization coverage for derived boot digests. |
internal/launcherbackend/contract_runtime_attestation_evidence.go |
Refactors attestation fail-closed policy and verification requirements around persisted evidence. |
internal/launcherbackend/contract_runtime_attestation_evidence_records.go |
Extracts attestation evidence/verification record construction and replay identity helpers. |
internal/launcherbackend/contract_image_receipt_types.go |
Extends runtime facts snapshots with post-handshake attestation input. |
internal/launcherbackend/contract_attestation_posture.go |
Tightens valid-attestation posture derivation to require evidence and verification digests. |
internal/launcherbackend/contract_attestation_posture_test.go |
Adds posture tests for missing evidence/verification digests. |
internal/brokerapi/service_runtime_facts.go |
Switches broker runtime handling to persisted/reconciled facts and authoritative posture derivation. |
internal/brokerapi/service_runtime_audit_details.go |
Limits attestation reason-code emission to invalid posture cases. |
internal/brokerapi/local_api_run_detail_state_authoritative_ops.go |
Projects richer attestation presence/digest/verification metadata into authoritative state. |
internal/brokerapi/local_api_run_detail_state_authoritative_ops_test.go |
Tests new authoritative-state attestation presence/success/failure signals. |
internal/brokerapi/local_api_ops_runtime_facts_test.go |
Moves shared launcher runtime facts fixtures and adds digest projection assertions. |
internal/brokerapi/local_api_ops_runtime_facts_fixture_test.go |
Adds reusable launcher runtime facts fixtures with post-handshake attestation input. |
internal/brokerapi/local_api_ops_runtime_facts_container_test.go |
Adds persisted-evidence restart coverage for container runtime facts. |
internal/brokerapi/local_api_ops_posture_evidence_test.go |
Adds synthetic receipt-only attestation coverage across backends. |
internal/brokerapi/broker_audit_test.go |
Adds audit transition tests for persisted attestation state changes. |
internal/brokerapi/broker_audit_helpers_test.go |
Extracts reusable audit test helper functions. |
internal/artifacts/store_runtime_facts.go |
Normalizes/persists post-handshake input and reconciles authoritative posture from evidence. |
internal/artifacts/store_runtime_facts_test.go |
Updates cache/evidence tests for post-handshake attestation inputs. |
internal/artifacts/store_runtime_attestation_cache.go |
Adjusts cached-verification replay placeholder detection. |
internal/artifacts/backup_manifest.go |
Normalizes post-handshake attestation input when cloning runtime facts for backups. |
Signed-off-by: Zebulon Rouse-Frantzich <zeb@runecode.org>
Signed-off-by: Zebulon Rouse-Frantzich <zeb@runecode.org>
Signed-off-by: Zebulon Rouse-Frantzich <zeb@runecode.org>
ZebulonRouseFrantzich
merged commit May 5, 2026
c6c7932
into
mvp/beta_close_gaps_and_polish
5 checks passed
ZebulonRouseFrantzich
deleted the
change/runtime_attestation_post_handshake_gating_v0
branch
May 5, 2026 00:44
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.
This pull request introduces several improvements and refactorings to the runtime attestation verification, evidence state management, and related test utilities. The main focus is on making the attestation verification process more robust, normalizing data structures, improving cache application logic, and enhancing test coverage and clarity.
Key changes include:
Runtime Attestation Verification and Evidence State Management
PostHandshakeAttestationInputandHardeningPosturein both thecloneRuntimeFactsSnapshotandRecordRuntimeEvidenceStatefunctions, ensuring consistent state updates and more reliable attestation verification. [1] [2]runtimeFactsForLifecycleUpdateLocked,applyLifecycleToRuntimeFacts, etc.), and added new logic to reconcile authoritative provisioning posture between facts and evidence. This ensures that posture is set consistently according to the latest evidence and attestation results. [1] [2] [3]isAttestationVerificationReplayPlaceholder) to more accurately determine when cached verification should be used, preventing incorrect cache application. [1] [2]Testing Improvements and Utilities
broker_audit_helpers_test.gofile with helper functions for more effective and readable audit event testing, such as finding specific events, decoding payloads, and asserting digest values.These changes collectively improve the reliability, maintainability, and testability of the runtime attestation and evidence management subsystem.