You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because there is a check in Grype for the size of the input file, which could be stdin. The behaviour of Size() is system-dependent according to the std docs.
I recommend getting rid of fileHasContent() entirely, since it's only used by the purl provider and doesn't have a reliable behaviour.
What happened:
I tried to run Grype for a single package coming from stdin:
This works on OSX, but not in a Linux container.
What you expected to happen:
The scanning happens as normal on all platforms.
How to reproduce it (as minimally and precisely as possible):
Running the example command above on Linux.
Anything else we need to know?:
That is the same problem as there: golang/go#62392 (comment)
Because there is a check in Grype for the size of the input file, which could be stdin. The behaviour of Size() is system-dependent according to the std docs.
I recommend getting rid of fileHasContent() entirely, since it's only used by the purl provider and doesn't have a reliable behaviour.
Environment:
grype version
for OSX:grype version
for Linux:cat /etc/os-release
or similar): OSX 14.6.1 / Debian 12The text was updated successfully, but these errors were encountered: