anchore / grype

A vulnerability scanner for container images and filesystems
Apache License 2.0
8.87k stars 575 forks source link

CycloneDX XML's Vulnerability Field cannot be unmarshalled into Component struct #349

Closed rxl7906 closed 2 years ago

rxl7906 commented 3 years ago

What happened:

What you expected to happen:

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

Anything else we need to know?:

Environment:

luhring commented 3 years ago

Copying context from a community Slack thread to here:

Today we don’t actually use those structs for unmarshaling (input), only marshaling (output). So that’s why you’ll see there are no tests to assert behavior for the input path — it’s not a behavior we actually support.

That said, if there’s a solution to your problem has no adverse impact to our codebase and makes your life better, we’re very open to considering it, just like with [this] PR for the component field -> https://github.com/anchore/grype/pull/344

spiffcs commented 2 years ago

Hey @rxl7906! We've seen a couple of updates in grype over this past year. We wanted to see if the json solution you came up with was working correctly and if this might still be an issue for you?