-
Notifications
You must be signed in to change notification settings - Fork 588
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: runtime error: index out of range [0] with length 0 #821
Comments
closing this duplicate since it seems to be an indexing issue on syft which grype imports |
I had to run a vulnerability check again today. Built: 2022-11-17 08:20:14 +0000 UTC After changing the $env:GRYPE_LOG_LEVEL = "debug", i found what was happening, and it seems that for syft for windows does not support files without extension. Stacktrace: [0000] INFO grype version: 0.52.0 goroutine 36 [running]: |
What happened:
panic: runtime error: index out of range [0] with length 0 when dealing with files without extension.
What you expected to happen:
Support when file has no extension?
How to reproduce it (as minimally and precisely as possible):
On Windows, execute it , guaranteeing that inside a folder, there is a file without an extension.
Anything else we need to know?:
As mentioned in anchore/syft#1024, I tried to use the exclude as a workaround but didn't work.
Environment:
Application: grype
Version: 0.41.0
Syft Version: v0.50.0
BuildDate: 2022-07-06T15:20:18Z
GitCommit: 0e0a9d9
GitDescription: v0.41.0
Platform: windows/amd64
GoVersion: go1.18.3
Compiler: gc
Supported DB Schema: 4
The text was updated successfully, but these errors were encountered: