Skip to content

Bind provider snapshots to their source assets - #59

Open
jsturtevant wants to merge 3 commits into
hyperlight-dev:mainfrom
jsturtevant:fix/issue-16-20261114
Open

jsturtevant wants to merge 3 commits into
hyperlight-dev:mainfrom
jsturtevant:fix/issue-16-20261114

Conversation

@jsturtevant

Copy link
Copy Markdown
Collaborator

Bind each provider snapshot to the exact rootfs, program, and kernel used to capture it. Reject missing or mismatched digests when selecting and packaging snapshots so stale images cannot run in place of the approved assets.

Fixes #16.

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 00:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The source-only review cannot validate native KVM/HVF capture and restore with the rewritten OCI index or verify the full new aarch64 kernel hash against checksum-locked runtime bytes.

No open issues 🎉

What changed in this PR

This PR binds provider snapshots to their source rootfs, program, and kernel, preventing stale snapshots from being selected or packaged in place of approved assets.

Changes:

  • Record capture-input digests and validate them during local and registry snapshot selection.
  • Enforce asset bindings during packaging and assembly while supporting platform-specific cold assets.
  • Pin embedded-kernel hashes, document the binding requirements, and add regression coverage.
File Description
providers/​tests/​test_snapshot_oci.py Tests missing, stale, and platform-specific snapshot bindings.
providers/​snapshot_oci.py Validates input digests during layout checks and assembly.
providers/​package.py Captures packaged assets and validates resulting snapshot bindings.
docs/​provider-authoring.md Documents digest annotations and validation behavior.
cli/​tests/​artifact.rs Tests asset-bound selection and native snapshot capture.
cli/​src/​provider_snapshot.rs Records input hashes and detects changes during capture.
cli/​src/​provider_registry/​tests.rs Tests rejection of mismatched inputs before layer downloads.
cli/​src/​provider_registry.rs Passes provider metadata into registry snapshot selection.
cli/​src/​embedded-kernels.json Pins embedded-kernel hashes by architecture.
cli/​src/​assets.rs Loads and validates embedded-kernel hash pins.
cli/​src/​artifact/​variants.rs Requires valid input bindings on selected variants.
cli/​src/​artifact.rs Supplies the provider manifest to local and registry selection.

Review effort: Balanced

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 03:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the provider snapshot input-binding changes.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bind provider snapshots to the provider's rootfs, program and kernel

2 participants