This repository was archived by the owner on Sep 10, 2024. It is now read-only.
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
invalid memory address or nil pointer dereference #7
Open
Description
Tried with several images, all crash with panic: runtime error: invalid memory address or nil pointer dereference
Using docker-index_0.0.13_windows_amd64
on powershell with a 16GB i5
This one from public docker repository
.\docker-index cve --image mcr.microsoft.com/dotnet/runtime:5.0-focal DSA-2022–0001
full stack trace
level=info msg="Requesting image mcr.microsoft.com/dotnet/runtime:5.0-focal"
level=info msg="Copied image"
INFO Indexing ⠋ panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x1d11f68]
goroutine 75 [running]:
github.com/aquasecurity/trivy/pkg/fanal/artifact/image.Artifact.Inspect({{0x0, 0x0}, {0x1ce46cc5358, 0xc003fbba88}, {{{0x0, 0x0, 0x0}, {0xc002c3c500, 0x3, 0x4}}}, ...}, ...)
/home/runner/go/pkg/mod/github.com/aquasecurity/[email protected]/pkg/fanal/artifact/image/image.go:72 +0x68
github.com/docker/index-cli-plugin/sbom.trivySbom({0xc002c60140, 0x9b}, {0xc003d14720, 0xc003d14750, 0xc003d147e0, 0xc003d14780, 0xc003d147b0}, 0xc003ac8c60)
/home/runner/work/index-cli-plugin/index-cli-plugin/sbom/trivy.go:67 +0x363
created by github.com/docker/index-cli-plugin/sbom.indexImage
/home/runner/work/index-cli-plugin/index-cli-plugin/sbom/index.go:95 +0x40f