Repository navigation
Bind provider snapshots to their source assets - #59
Open
jsturtevant wants to merge 3 commits into
Open
jsturtevant wants to merge 3 commits into
jsturtevant wants to merge 3 commits into
Conversation
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
There was a problem hiding this comment.
🔵 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>
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.
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.