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

Panic on "syft scan" #3434

Open
cilki opened this issue Nov 11, 2024 · 1 comment
Open

Panic on "syft scan" #3434

cilki opened this issue Nov 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cilki
Copy link

cilki commented Nov 11, 2024

What happened:

 ✔ Loaded image                                                                                                                                                                                                               47d9af12d6c6
 ⠹ Parsing image                   ━━━━━━━━━━━━━━━━━━━━                                                                                                            sha256:47d9af12d6c6d9e3fa9e923768bb0ecfcd99ba0b09374b7ffd341dde86c11491
panic: interface conversion: filetree.Reader is nil, not *filetree.FileTree

goroutine 26 [running]:
github.com/anchore/stereoscope/pkg/filetree.NewSearchContext({0x0, 0x0}, {0x7f5b310d8ef8, 0xc0006d3650})
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/pkg/filetree/search.go:33 +0x1a5
github.com/anchore/stereoscope/pkg/image.(*Image).Read(0xc000308e08)
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/pkg/image/image.go:243 +0x866
github.com/anchore/stereoscope/pkg/image/docker.(*tarballImageProvider).Provide(0xc0003113e8, {0x47?, 0xc00015f600?})
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/pkg/image/docker/tarball_provider.go:95 +0x5a5
github.com/anchore/stereoscope/pkg/image/docker.(*daemonImageProvider).Provide(0xc0006c4240, {0x1fc8fd8, 0xc00053b720})
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/pkg/image/docker/daemon_provider.go:282 +0x71e
github.com/anchore/syft/syft/source/stereoscopesource.stereoscopeImageSourceProvider.Provide({{0x1fc0ff8, 0xc0006c4240}, {{{0x7ffd101d6d30, 0xc}, 0x0, {0x0, 0x0, {...}, {...}, {...}}}, ...}}, ...)
        /home/runner/work/syft/syft/syft/source/stereoscopesource/image_source_provider.go:32 +0xb3
github.com/anchore/syft/syft.GetSource({0x1fc8fd8, 0xc00053b720}, {0x7ffd101d6d30, 0xc}, 0xc0004be380?)
        /home/runner/work/syft/syft/syft/get_source.go:29 +0x1b8
github.com/anchore/syft/cmd/syft/internal/commands.getSource({0x1fc8fd8, 0xc00053b720}, 0xc000453240, {0x7ffd101d6d30, 0xc}, {0x0, 0x0, 0x0})
        /home/runner/work/syft/syft/cmd/syft/internal/commands/scan.go:250 +0x63b
github.com/anchore/syft/cmd/syft/internal/commands.runScan({0x1fc8fd8, 0xc00053b720}, {{0x19aad4f, 0x4}, {0x1fb0980, 0x6}, {0x1fc56a0, 0x28}, {0x1fb25f0, 0x7}, ...}, ...)
        /home/runner/work/syft/syft/cmd/syft/internal/commands/scan.go:187 +0x27d
github.com/anchore/syft/cmd/syft/internal/commands.Scan.func1(0xc000574c08, {0xc00048c180, 0x1, 0x0?})
        /home/runner/work/syft/syft/cmd/syft/internal/commands/scan.go:103 +0xe6
github.com/anchore/clio.(*application).setupCommand.(*application).WrapRunE.func2.1(0x0?, {0xc00048c180?, 0x1000000?, 0x0?})
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/application.go:147 +0x9e
github.com/anchore/clio.async.func1()
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/application.go:345 +0x6a
created by github.com/anchore/clio.async in goroutine 1
        /home/runner/go/pkg/mod/github.com/anchore/[email protected]/application.go:343 +0xc5

Can't share the image, but it's a fairly large Debian based image.

What you expected to happen:

Doesn't panic.

Environment:

  • Output of syft version:
    syft 1.16.0

  • OS (e.g: cat /etc/os-release or similar):
    Debian Trixie

@cilki cilki added the bug Something isn't working label Nov 11, 2024
@kzantow
Copy link
Contributor

kzantow commented Nov 11, 2024

Hey @cilki -- is there any way to get a minimal reproducible case to see what's going on here? Without a way to reproduce the issue it will make fixing it a lot harder. Scanning any of our test images based on Debian or the official Debian images don't seem to have this issue, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants