Commit 7c9b4aa
fix(image): don't reject remote images whose ArtifactType is just a config media type
go-containerregistry sets Descriptor.ArtifactType to the manifest's config
media type whenever the manifest itself has no explicit `artifactType` field.
This is the case for essentially all plain, single-architecture image
manifests fetched directly (as opposed to a multi-arch manifest list/index,
which has no config field and so leaves ArtifactType empty).
The check added to reject non-image OCI artifacts (Helm charts, WASM
modules, etc.) in the remote image source didn't account for this, causing
single-arch images pulled via the remote fallback to fail with:
remote error: unsupported artifact type "application/vnd.docker.container.image.v1+json" for image "..."
Backported from upstream aquasecurity/trivy (fixed as of v0.72.0, alongside
a go-containerregistry bump that isn't needed here since IsConfig() is
already available in the go-containerregistry version this fork depends on).
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 5d0baf7 commit 7c9b4aa
2 files changed
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
147 | 170 | | |
148 | 171 | | |
149 | 172 | | |
| |||
0 commit comments