Skip to content
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

vendor: bump github.com/anchore/syft from 0.98.0 to 0.105.0 #94

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

crazy-max
Copy link
Member

Dependabot can't bump to 0.101.0 because of a breaking change with the cataloger related to anchore/syft#1383:

updater | 2024/02/13 02:29:49 INFO <job_786326499> Handled error whilst updating github.com/anchore/syft: dependency_file_not_resolvable {:message=>"github.com/anchore/syft/syft/pkg/cataloger: no required module provides package github.com/anchore/syft/syft/pkg/cataloger; to add it:"}

@crazy-max
Copy link
Member Author

crazy-max commented Feb 13, 2024

Current (0.98.0) and latest syft version still fails with amazonlinux image: https://github.com/docker/buildkit-syft-scanner/actions/runs/7883917948/job/21511817145?pr=94#step:7:75

> [linux/amd64] generating sbom using localhost:5000/buildkit-syft-scanner:latest:
0.074 time="2024-02-13T08:52:15Z" level=info msg="starting syft scanner for buildkit abb0e9e"
0.474 panic: unable to get file resolver: unable to create directory resolver: unable to index filesystem path="/run/src/extras/sbom-base/dev/fd/2": unable to index branch="/run/src/extras/sbom-base/dev/fd/2": lstat /proc/1/fd/pipe:[33575]: no such file or directory
0.474 
0.474 goroutine 1 [running]:
0.474 main.main()
0.474 	github.com/docker/buildkit-syft-scanner/cmd/syft-scanner/main.go:51 +0x145

# See the License for the specific language governing permissions and
# limitations under the License.

FROM amazonlinux:2 AS base

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syft v0.105.0 should account for the scanning issues you're having here 👍


result, err := syft.CreateSBOM(context.Background(), src, syft.DefaultCreateSBOMConfig())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like earlier the image catalogers were being used regardless of the input source type. To replicate the same behavior you can add that ask to the CreateSBOMConfig:

cfg := syft.DefaultCreateSBOMConfig().
		WithCatalogerSelection(
			pkgcataloging.NewSelectionRequest().
				WithDefaults(pkgcataloging.ImageTag),
		)

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title vendor: bump github.com/anchore/syft from 0.98.0 to 0.104.0 vendor: bump github.com/anchore/syft from 0.98.0 to 0.105.0 Feb 14, 2024
@crazy-max crazy-max marked this pull request as ready for review February 15, 2024 07:00
@crazy-max crazy-max merged commit 7867d73 into docker:master Feb 15, 2024
10 checks passed
@crazy-max crazy-max deleted the bump-syft branch February 15, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants