Skip to content

Conversation

@luhring
Copy link
Contributor

@luhring luhring commented Jun 14, 2024

A common case in vulnerability matching is when two vulnerability matches are the same except for their location. I noticed this case was causing Grype to produce inconsistent output when using its match sorting, e.g. sort.Sort(match.ByElements(matches)).

This PR adds consideration for locations into the match sort ordering logic.

luhring added 2 commits June 14, 2024 12:00
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
Copy link
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@wagoodman wagoodman added the bug Something isn't working label Jun 14, 2024
@wagoodman wagoodman merged commit f599a66 into anchore:main Jun 14, 2024
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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants