You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposing here that trivy add support for muti-arch containers containing application/vnd.oci.image.index.v1+json types, listing multiple items in the manifests array. This is a standard index, that can be tagged for a single app that can run on multiple architectures. At runtime, clients will pull the correct architecture. But it could be used to scan all architectures for the index and combined into a single report.
When scanning a multi-arch TAR file today, trivy fails. Providing --platform as an option to trivy image produces the same error. (note: I tried aarch64 and arm64 formats)
% trivy image --input test.tar --platform aarch64
2024-10-31T20:42:30-04:00 INFO [vuln] Vulnerability scanning is enabled
2024-10-31T20:42:30-04:00 INFO [secret] Secret scanning is enabled
2024-10-31T20:42:30-04:00 INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-10-31T20:42:30-04:00 INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.56/docs/scanner/secret#recommendation for faster secret detection
2024-10-31T20:42:30-04:00 FATAL Fatal error image scan error: scan error: unable to initialize a scanner: unable to initialize the archive scanner: 2 errors occurred:
* unable to open test.tar as a Docker image: tarball must contain only a single image to be used with tarball.Image
* unable to open test.tar as an OCI Image: stat test.tar/index.json: not a directory
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
Proposing here that trivy add support for muti-arch containers containing
application/vnd.oci.image.index.v1+json
types, listing multiple items in themanifests
array. This is a standard index, that can be tagged for a single app that can run on multiple architectures. At runtime, clients will pull the correct architecture. But it could be used to scan all architectures for the index and combined into a single report.Example index:
When scanning a multi-arch TAR file today, trivy fails. Providing
--platform
as an option totrivy image
produces the same error. (note: I triedaarch64
andarm64
formats)Target
Container Image
Scanner
None
Beta Was this translation helpful? Give feedback.
All reactions