Open davidhay1969 opened 1 year ago
I tried a hack of "upgrading" syft
in go.mod
, changing from: -
github.com/anchore/syft v0.46.3
to: -
github.com/anchore/syft v0.64.0
but that broke go mod tidy
go: finding module for package github.com/anchore/syft/syft/logger
github.com/docker/sbom-cli-plugin/internal/log imports
github.com/anchore/syft/syft/logger: module github.com/anchore/syft@latest found (v0.64.0), but does not contain package github.com/anchore/syft/syft/logger
and go get
github.com/docker/sbom-cli-plugin imports
github.com/docker/sbom-cli-plugin/cmd imports
github.com/docker/sbom-cli-plugin/internal/log imports
github.com/anchore/syft/syft/logger: cannot find module providing package github.com/anchore/syft/syft/logger
What happened:
The
TestAllFormatsExpressible
test fails due, I believe, tosyft
related issue: -cd /root/go/src/github.com/docker/sbom-cli-plugin/test/cli
go test -v ./... --run TestAllFormatsExpressible
I see the same if I run the bundled
docker-sbom
binary, which includessyft
v0.46.3
: -/root/go/src/github.com/docker/sbom-cli-plugin/snapshot/sbom-cli-plugin_linux_amd64/docker-sbom sbom stereoscope-fixture-image-pkg-coverage:c531ccd41ba451da7aa4700ba89e889b9109c2841710bb0c80af91d10705b6d6 --format syft-table
ls -al /root/go/src/github.com/docker/sbom-cli-plugin/snapshot/sbom-cli-plugin_linux_amd64/docker-sbom
/root/go/src/github.com/docker/sbom-cli-plugin/snapshot/sbom-cli-plugin_linux_amd64/docker-sbom sbom --version
Debug shows a little more: -
/root/go/src/github.com/docker/sbom-cli-plugin/snapshot/sbom-cli-plugin_linux_amd64/docker-sbom sbom --debug stereoscope-fixture-image-pkg-coverage:c531ccd41ba451da7aa4700ba89e889b9109c2841710bb0c80af91d10705b6d6 --format syft-table
I can reproduce this by installing the same version of
syft
: -wget https://github.com/anchore/syft/releases/download/v0.46.3/syft_0.46.3_linux_amd64.deb
dpkg --install syft_0.46.3_linux_amd64.deb
syft --version
syft stereoscope-fixture-image-pkg-coverage:c531ccd41ba451da7aa4700ba89e889b9109c2841710bb0c80af91d10705b6d6
If I instead download/install the latest version of
syft
: -dpkg --remove syft
wget https://github.com/anchore/syft/releases/download/v0.64.0/syft_0.64.0_linux_amd64.deb
dpkg --install syft_0.64.0_linux_amd64.deb
syft --version
I don't see the same issue: -
syft stereoscope-fixture-image-pkg-coverage:c531ccd41ba451da7aa4700ba89e889b9109c2841710bb0c80af91d10705b6d6
What you expected to happen:
The
TestAllFormatsExpressible
test should passHow to reproduce it (as minimally and precisely as possible):
See above
Anything else we need to know?:
This only appears to fail thusly on Ubuntu Linux; testing
syft
v0.46.3
on macOS doesn't exhibit the same issue: -wget https://github.com/anchore/syft/releases/download/v0.46.3/syft_0.46.3_darwin_arm64.tar.gz
tar xvzf syft_0.46.3_darwin_arm64.tar.gz
./syft --version
syft stereoscope-fixture-image-pkg-coverage:latest
Failing Ubuntu
lsb_release -a
Working macOS
sw_vers
Environment:
docker version
:docker version
docker sbom version
:N/A