Skip to content
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

Grype exist with error on JSON output with PURL input #2360

Open
chovanecadam opened this issue Jan 2, 2025 · 0 comments
Open

Grype exist with error on JSON output with PURL input #2360

chovanecadam opened this issue Jan 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@chovanecadam
Copy link

What happened:

When scanning a file of PURLs or a single PURL and setting output format to json, Grype panics.

What you expected to happen:

Grype does not panic and creates the outputs.

How to reproduce it (as minimally and precisely as possible):

podman run --rm --name Grype -v grypedb:/.cache/grype docker.io/anchore/grype:v0.86.1 'pkg:deb/debian/[email protected]?arch=amd64&distro=debian-12' -o json=/dev/stdout
[0000]  WARN unable to determine GOPATH or user home dir: %!w(string=exec: "getent": executable file not found in $PATH)
[0000] ERROR 1 error occurred:
        * unable to write result: unable to encode result: unsupported source: pkg.PURLLiteralMetadata

Anything else we need to know?:

This is a regression in 0.86.1, because version 0.86.0 is not affected. Most probably a result of fixing #2324. I wish there was a testing infrastructure that runs some basic checks like this one in Docker to catch these regressions.

Environment:

  • Output of grype version: 0.86.1
  • OS (e.g: cat /etc/os-release or similar):
@chovanecadam chovanecadam added the bug Something isn't working label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant