validate: skip non-layer layers#2298
Conversation
Docker Official Images like busybox and ubuntu now include "layers" in image manifests that are not layers, but are instead in-toto attestations about the layers. This confuses 'crane validate', which expected layers to be gzipped tarballs.
This change skips validation of layers that are not a layer media type.
With this change:
$ go run ./cmd/crane validate --remote=busybox
PASS: busybox
Signed-off-by: Jason Hall <imjasonh@gmail.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2298 +/- ##
===========================================
- Coverage 71.67% 56.73% -14.94%
===========================================
Files 123 165 +42
Lines 9935 11259 +1324
===========================================
- Hits 7121 6388 -733
- Misses 2115 4112 +1997
- Partials 699 759 +60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Docker Official Images like busybox and ubuntu now include "layers" in image manifests that are not layers, but are instead in-toto attestations about the layers. This confuses 'crane validate', which expected layers to be gzipped tarballs.
This change skips validation of layers that are not a layer media type.
With this change:
$ go run ./cmd/crane validate --remote=busybox
PASS: busybox
Signed-off-by: Jason Hall <imjasonh@gmail.com>
Docker Official Images like busybox and ubuntu now include "layers" in image manifests that are not layers, but are instead in-toto attestations about the layers. This confuses 'crane validate', which expected layers to be gzipped tarballs.
This change skips validation of layers that are not a layer media type.
With this change: