spec: update to image-spec v1.1.1#630
Merged
cyphar merged 11 commits intoopencontainers:mainfrom Oct 3, 2025
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #630 +/- ##
==========================================
+ Coverage 72.74% 72.89% +0.14%
==========================================
Files 70 71 +1
Lines 6002 6164 +162
==========================================
+ Hits 4366 4493 +127
- Misses 1188 1213 +25
- Partials 448 458 +10
🚀 New features to boost your workflow:
|
92c0532 to
36c79e3
Compare
0743e02 to
a4a6ce6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This new assertion package originally comes from pathrs-lite (filepath-securejoin) but as the sole copyright holder, SUSE hereby sublicences this version as Apache-2.0 so it can be used with umoci. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
The sanity check for Blob.RawData really should verify that the data is the correct size, as opposed to just >0. In addition, this is a programmer error and so should cause a panic. Fixes: 4a02437 ("casext: provide raw blob data when fetching parsable blobs") Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This lets us have nice snapshot tests for fields that aren't going to be used on the kinds of images we can use in our integration tests (such as the Windows-specific fields). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
When rewriting the DescriptorPath, we would previously only modify descriptors that exactly match our old descriptor and replace all of the fields. This is less than ideal -- in principle we want to replace all descriptors that have the same digest, but without clearing any fields (to avoid clearing annotations from descriptors that have extra annotations which is conceivable). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
There were a few build failures related to the embedding of the ispec.Platform struct, as well as some lint errors due some fields being marked as deprecated. In addition, add some new snapshot tests for pretty-printing the new examples in the spec. As we do not yet support pretty-printing this data, these tests will be adjusted in a future patch in this series when we add support for it. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
These are fairly straight-forward, the only notable thing is that we have a minimal xxd(1) implementation to pretty-print the embedded data in descriptors. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
7847e5c to
7c4cde1
Compare
The logic for reading is fairly straight-forward -- we replace the VerifiedReadCloser with a pre-verified bytes.Buffer. There are only a few notable other changes needed: * Our hardening integration tests needed to be modified -- some images have started to use embedded descriptor data for some blobs (such as the config blob), which makes modifying the on-disk blobs no longer fail to validate (as we do not try to read from the on-disk blob in that case). * The DescriptorPath updating in the image mutator needs to clear embedded data from existing descriptors, otherwise we will end up with descriptors that have new digests but old embedded data. Ideally we would re-generate it, but we can do this in the future when we add more general write support for embedded descriptor data. This patch does not add support for creating these kinds of descriptors, that is left for a future patch. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
While this is a fairly hypothetical problem, the spec explicitly defines what "application/vnd.oci.empty.v1+json" should look like and so we should validate it. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
With the existence of OCI arifacts we should at least provide some information with "umoci stat" rather than erroring out if we see an image that has a configuration blob that is non-standard. Other operations will still fail, of course. We will still error out if the manifest is invalid -- this is mainly because the stat code already implicitly requires the top blob to be a manifest (and our reference resolution logic only targets manifests currently). Also, even OCI artifacts still use manifests (they were forced to because of similar issues with registries). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
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.
Fixes #455
Closes #565
Signed-off-by: Aleksa Sarai cyphar@cyphar.com