scout-cli
scout-cli copied to clipboard
docker scout quickview crashes if an image is not specified
The quickview crashes if you do not specify an image.
docker scout version version: v1.9.3 (go1.22.3 - darwin/arm64) git commit: e3dbad31cfc7736809470453fc317c22d361c207
docker scout quickview panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x78 pc=0x1017949e0]
goroutine 1 [running]: github.com/google/go-containerregistry/pkg/v1.(*ConfigFile).Platform(...) /home/runner/go/pkg/mod/github.com/google/[email protected]/pkg/v1/config.go:46 github.com/docker/scout-cli-plugin/internal/dockercli.(*Store).GetNewest(0x1400026cfb0, {0x102d4b4b0, 0x14000c251d0}) /home/runner/work/scout-cli-plugin/scout-cli-plugin/internal/dockercli/localstore.go:183 +0x9f0 github.com/docker/scout-cli-plugin/images.(*ImgService).GetNewestSource(0x14000f2cc00?, {0x102d4b4b0?, 0x14000c251d0?}) /home/runner/work/scout-cli-plugin/scout-cli-plugin/images/images.go:311 +0x34 github.com/docker/scout-cli-plugin/internal/commands/quickview.NewCmd.func2(0x0?, {0x0?, 0x0?, 0xaf03198e00000000?}) /home/runner/work/scout-cli-plugin/scout-cli-plugin/internal/commands/quickview/quickview.go:170 +0x610 github.com/docker/cli/cli-plugins/plugin.RunPlugin.func1.1.2(0x14000798f08, {0x104110c00, 0x0, 0x0}) /home/runner/go/pkg/mod/github.com/docker/[email protected]+incompatible/cli-plugins/plugin/plugin.go:69 +0x68 github.com/spf13/cobra.(*Command).execute(0x14000798f08, {0x14000510f50, 0x0, 0x0}) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0x840 github.com/spf13/cobra.(*Command).ExecuteC(0x140008bbb08) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x344 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 github.com/docker/cli/cli-plugins/plugin.RunPlugin(0x14000960000, 0x14000798008, {{0x101c82cc2, 0x5}, {0x101cac97f, 0xb}, {0x140013168b6, 0x6}, {0x101cb99b9, 0xc}, ...}) /home/runner/go/pkg/mod/github.com/docker/[email protected]+incompatible/cli-plugins/plugin/plugin.go:84 +0x138 main.runPlugin(0x14000960000) /home/runner/work/scout-cli-plugin/scout-cli-plugin/cmd/docker-scout/main.go:29 +0x104 main.main() /home/runner/work/scout-cli-plugin/scout-cli-plugin/cmd/docker-scout/main.go:53 +0x130
Same problem with docker scout cves -e fs://. However, getting different behaviors across several environments.
Using Docker Engine v27.1.1 on RHEL 8 x86_64. Docker Scout v1.13.0, get a nil pointer dereference panic.
Strangely, getting different traces in a Jenkins pipeline versus a direct SSH terminal console to that RHEL server. The former shows a raw Go panic trace for a nil pointer deference. The latter shows a nicer error about Docker Hub authentication. Even though docker login claims to succeed.
Not getting any errors when using Docker Desktop on Windows x86_64 and Mac ARM 64 laptops. The Mac is using Docker v27.0.3, Scout v1.10.0.
What's crazy is that I'm not even targeting any images, just local files. It seems that Scout is blindly assuming local images, and only doing so in Linux, with platform specific (tty specific?) error handling logic.
Unfortunately, difficult to track the problem much further due to Docker (Scout) obfuscating the logic as closed source.
When I run docker scout quickview on kubuntu24.04, my computer is running like a crazy (I can hear the sound) but I loose control of my computer from screen. The mouse is not working. The keyboard is not working, either. I am not sure if I have to wait longer or I just restart my computer with bruite-force.
Update:
Docker Scout crashes with v1.13.0. Works fine with v1.12.0. Something is broken in the current release.