zarf-dev / zarf

DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Apache License 2.0
1.42k stars 171 forks source link

Preserve appropriate `mediaType` on package layers #3009

Open marshall007 opened 2 months ago

marshall007 commented 2 months ago

Is your feature request related to a problem? Please describe.

Currently Zarf uses a generic application/vnd.zarf.layer.v1.blob to describe every layer in the OCI manifest. This is confusing because many of these layers point to blobs with well-defined mediaTypes already.

Describe the solution you'd like

The Easy Stuff

The Harder Stuff

Additional context

Overloading application/vnd.zarf.layer.v1.blob makes the existing OCI manifests difficult to consume by other tooling. Preserving the mediaTypes for these layers makes it much easier to disambiguate the blobs.

For example, when implementing container image scanning, it would be great if we could just look for application/vnd.oci.image.manifest.v1+json layers as a starting point.

Along the same lines, the "harder stuff" would bring us inline with other CNCF/OpenSSF tooling and ultimately reduce the plumbing necessary to use things like trivy with Zarf packages.

AustinAbro321 commented 2 months ago

Thanks for making this issue! I agree using more accurate media types for layers would be a boon.

A couple notes