-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support Singularity media types found in OCI registry #254
Comments
Hi @kzantow, apologies for the slow response. I just pushed a SIF up to Dockerhub here: https://hub.docker.com/r/sylabsadam/alpine-sif. It looks like things have improved since my original report. $ syft packages registry:sylabsadam/alpine-sif
Command "packages" is deprecated, use `syft scan` instead
✔ Parsed image sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
could not determine source: an error occurred attempting to resolve 'sylabsadam/alpine-sif': oci-registry: unknown layer media type: application/vnd.sylabs.sif.layer.v1.sif Running against the SIF locally still seems to work as expected: $ singularity pull oras://sylabsadam/alpine-sif
INFO: Downloading oras image
3.4MiB / 3.4MiB [==============================================================================================================] 100 % 1.7 MiB/s 0s
$ syft packages singularity:alpine-sif_latest.sif
Command "packages" is deprecated, use `syft scan` instead
✔ Parsed image sha256:bd640a41460ae7bfae0d608ad063c84cf5b61ef1b9647531bd59cbf57e519dde
✔ Cataloged contents ff77047d9cb035df6be6800b79aea4df63d2fb3e46c59125b2fc2d5235062496
├── ✔ Packages [14 packages]
├── ✔ File digests [77 files]
├── ✔ File metadata [77 locations]
└── ✔ Executables [17 executables]
NAME VERSION TYPE
alpine-baselayout 3.6.5-r0 apk
alpine-baselayout-data 3.6.5-r0 apk
alpine-keys 2.4-r1 apk
apk-tools 2.14.4-r0 apk
busybox 1.36.1-r29 apk
busybox-binsh 1.36.1-r29 apk
ca-certificates-bundle 20240226-r0 apk
libcrypto3 3.3.1-r0 apk
libssl3 3.3.1-r0 apk
musl 1.2.5-r0 apk
musl-utils 1.2.5-r0 apk
scanelf 1.3.7-r2 apk
ssl_client 1.36.1-r29 apk
zlib 1.3.1-r1 apk |
I think we still probably have something to do here: support non-OCI image types from After a very short deliberation, I think my preferred approach would be to move the registry provider from the I've retitled this issue to better reflect the ask, let me know if I've misrepresented anything @tri-adam ! |
Yeah, agreed that there's still some work to do here... It seems to me that the logic you suggest near https://github.com/anchore/stereoscope/blob/main/pkg/image/oci/registry_provider.go#L92 is in the right area. In the case of the SingularityCE image I listed in my last comment, the config mediaType and/or the layer mediaType could tee things off to the As for where that logic should live structurally, seems to me like there are good arguments for pulling the detection logic into its own package. Would you envision that logic calling into the |
What happened:
When running
syft packages
against aregistry:
source that contains a SIF image, apanic
occurs:What you expected to happen:
Expected the same output as running
syft packages
against the SIF image locally:How to reproduce it (as minimally and precisely as possible):
Using SingularityCE, push a SIF image to a supported OCI registry (I used Harbor), and process with Syft:
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: