feat(RHEL): respect multiple RHSAs based on stream in version#3533
Draft
willmurphyscode wants to merge 1 commit into
Draft
feat(RHEL): respect multiple RHSAs based on stream in version#3533willmurphyscode wants to merge 1 commit into
willmurphyscode wants to merge 1 commit into
Conversation
Previously, when multiple RHSAs fixed the same RPM in the same major version of RHEL, Grype was only able to match based on the one with the highest epoch-version-release (EVR). Change grype to now choose the right RHSA if multiple are available based on the elN_M suffix that the fixed versions carry. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
564d061 to
fbc37d0
Compare
willmurphyscode
commented
Jun 25, 2026
| // build matches an unaffected record and the matcher can drop the otherwise-false-positive | ||
| // disclosure - and report which advisory's fix the host already carries. The rpm-modularity | ||
| // qualifier mirrors the affected handle so modular hosts match the right stream. | ||
| func exactUnaffectedHandles(group groupIndex, fixedIns []unmarshal.OSFixedIn, vuln unmarshal.OSVulnerability, qualifiers *db.PackageQualifiers) []db.UnaffectedPackageHandle { |
Contributor
Author
There was a problem hiding this comment.
Can we use package qualifiers to keep the matcher from having to be too smart here? Like a "RHEL Y Stream reachability" qualifier or something?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, when multiple RHSAs fixed the same RPM in the same major version of RHEL, Grype was only able to match based on the one with the highest epoch-version-release (EVR). Change grype to now choose the right RHSA if multiple are available based on the elN_M suffix that the fixed versions carry.