docker scout quickview crashes if an image is not specified
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the stack-trace locations in internal/dockercli/localstore.go, images/images.go, and internal/commands/quickview/quickview.go. Run docker scout quickview without an image and trace the nil value through GetNewest and GetNewestSource; done means the command no longer panics when no image is specified.
Written by the indexing model from the issue text.
Description
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/go-containerregistry@v0.19.1/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/cli@v26.1.3+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/cobra@v1.8.0/command.go:983 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x140008bbb08)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/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/cli@v26.1.3+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
- Dominant language
- Shell
- Stars
- 454
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/scout-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
allstar
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
panic: nil deref in createVCS() scanning multi-arch image by tag when no attestation sidecar exists Open
Difficulty 4/5 3-5 days Newbie friendliness 64/100
All issues in docker/scout-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·