-
Notifications
You must be signed in to change notification settings - Fork 17
oci: do not require top-level mediaType #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
d16b138
to
febc238
Compare
The top-level mediaType member was added in response to CVE-2021-41190, but while it is suggested (SHOULD) it is not required (MUST) and some older tools do not fill this mediaType field (such as skopeo, at least for "index.json"). I plan to use these jq-based validation scripts for umoci, but incompatibility with skopeo is a little annoying (since that is what we use to pull images for our tests). We can work around it for "index.json", but it seems incorrect to claim that an image is invalid because of a missing suggested field. Instead, add an informational message but still permit such images. Signed-off-by: Aleksa Sarai <[email protected]>
febc238
to
4d7e69c
Compare
As I've noted over in #127 (comment), the point of this validation is not general purpose "is this valid according to the OCI" but more specifically "is this both valid according to the OCI and matches our more specific and opinionated expectations", which is why I made the very explicit decision to require To put that more succinctly, every tool that we use to generate these objects already includes Given that these are all Even better would be to preserve the explicit meta-scripts/helpers/oci-validate.sh Lines 101 to 104 in fab86e6
meta-scripts/helpers/oci-validate.sh Lines 136 to 139 in fab86e6
(which could very reasonably be |
That's understandable but still a bit unfortunate. I was hoping to be able to use this directly as a stop-gap for I'm happy to carry these in a fork I guess (since it is ultimately just a stop-gap) but it would be nice to have a non-Go validation tool just in case (and I was hoping to be able to use both |
If I could do all the OCI layout traversal in pure I've toyed with the idea of doing something with A few relevant
|
The top-level mediaType member was added in response to CVE-2021-41190,
but while it is suggested (SHOULD) it is not required (MUST) and some
older tools do not fill this mediaType field (such as skopeo, at least
for "index.json").
I plan to use these jq-based validation scripts for umoci, but
incompatibility with skopeo is a little annoying (since that is what we
use to pull images for our tests). We can work around it for
"index.json", but it seems incorrect to claim that an image is invalid
because of a missing suggested field.
Instead, add an informational message but still permit such images.
Signed-off-by: Aleksa Sarai [email protected]