-
Notifications
You must be signed in to change notification settings - Fork 587
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
syft produces different output when run with sudo #1391
Labels
bug
Something isn't working
Comments
Hi @Hritik14 -- this is effectively the issue you reported against |
@kzantow Hi, Yes. Keeping it here as an end-user issue. |
This was referenced Mar 31, 2023
Closed
This was referenced Apr 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please provide a set of steps on how to reproduce the issue
On an
arm
machine (Technically, any machine other than x86 will do).What happened:
syft
running withsudo
yields different results than without sudo.What you expected to happen:
Both runs should have same output.
Anything else we need to know?:
When run with
sudo
, docker daemon is available and is used. Without sudo, syft uses OCI registry via stereoscope.Stereoscope takes the following approach while determining image pull methodology:
Source: https://github.com/anchore/stereoscope/blob/3b80d983223f6e6fc2d33b0ffa003d30268418e9/pkg/image/source.go#L134-L139
and because there are inconsistencies between OCI source and docker daemon in stereoscope when respective
Providers
are run without supplying aplatform
, it bubbles out to syft yielding different images (one x86 and other arm) and thus different SBOMs.See:
docker:
vsregistry:
from multi-platform images stereoscope#149This can be avoided by having a correct default value for
platform
Environment:
syft version
:cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: