-
Notifications
You must be signed in to change notification settings - Fork 530
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 #1094
Comments
Updated the issue link - Thanks for opening the bug @nba1992 - I'll link this with the other windows issue and try and get you guys a solution. We're working through a backlog of tickets right now so it might be some time before we get an update here. Pull requests or a more detailed stack trace with the exact command that caused it is always welcome if you have extra bandwidth. Thanks again |
Sorry for the delay here @nba1992 -- could you try the latest version of Syft and provide the stack trace output if still seeing this issue? |
I had to run a vulnerability check again today. Built: 2022-11-17 08:20:14 +0000 UTC After changing the $env:SYFT_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]: |
Hello @spiffcs, @kzantow Error: Repro steps (with choco, prev. version): run workflow with job:
Logs: logs_74.zip Repro steps (installed from sources, latest) : run workflow with job:
Logs: logs_77.zip |
#1366 removes the panic condition. We should start seeing sane errors again for this failure. Based on the debug log posted by @erik-bershel it looks like the directory resolver needs a look so that the symlinks are being handled correctly. |
Closing this since the underlying panic has been solved. Kept the replication and steps for debugging purposes on the new #1373 issue that addresses the directory resolution error case |
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 #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: 0e0a9d9e7a28592db489499db0294608e5fe69b8
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: