-
Notifications
You must be signed in to change notification settings - Fork 609
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
Fix CPE target software filtering + improve logging #2494
Conversation
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed the reason for returning, well, a "reason" from the criteria. Something about it doesn't sit well for me, though I can't really put my finger on exactly why. I understand there are some strings formatted with some appropriate context this way, but I wonder if the Criteria interface required fmt.Stringer
to provide "enough" information for logs, or there's a different thing that would sit better. Regardless, this isn't something I want to hold up this PR for. I'll add a 1.0 issue to revisit this.
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
I tried that initially but wasn't able to cover all cases. Always up for reevaluating that approach for grype 1.0 |
Added label updates to support this PR: anchore/vulnerability-match-labels#141 |
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
I've verified that the QG matching is doing the right thing even though in some cases this is performing a little worse in the examples we have. I'll adad ignore rules for the QG for these exceptions such that we can safely merge this PR. |
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This changes the target software processing for CPEs such that, when we don't have a known package type (or is a binary type) we use the original CPEs on the package and vulnerability to understand if there is an overlap or not of target softwares -- this enables us to allow broad CPE matching (when a TWS of
python
should match with a TWS of*
). Additionally for packages with known types we also do the same intersection but instead of checking for broad CPE matching we fallback to the existing logic that is there today (looking at package attributes).In terms of the logging improvements, now refuted entries always come with a reason. The old logs look like so:
The new logs have less addresses and more info: