fix: do not expand distro query on distro UAPs#3421
Draft
willmurphyscode wants to merge 3 commits intoanchore:mainfrom
Draft
fix: do not expand distro query on distro UAPs#3421willmurphyscode wants to merge 3 commits intoanchore:mainfrom
willmurphyscode wants to merge 3 commits intoanchore:mainfrom
Conversation
Normal querying falls back to broader and broader distro searches, e.g. major and minor match, matcher matches and minor is blank, then major matches and minor does not. In order to be more conservative with the UnaffectedPackageHandle records from distro NAKs, searches for unaffected packages should be strict by default (they should not fall back to mismatched major/minor distro version rows). In other words, when no records match a distro, by default expand the search for _disclosures_ that may match the distro, but do not expand the search for _unaffected records_ that match may match the distro. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
wagoodman
previously approved these changes
May 5, 2026
will need more careful review and test - there might be a regression in here we missed.
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
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.
Normal querying falls back to broader and broader distro searches, e.g. major and minor match, matcher matches and minor is blank, then major matches and minor does not. So searching for "rhel 9.3" would match "rhel 9.3", then if that's empty, "rhel 9" and if that's empty "rhel 9.2". This makes sense, because if the last time a CVE was mentioned for RHEL 9 it was a disclosure on RHEL 9.2, it probably still applies on RHEL 9.3. The same is not necessarily true of NAKs and fixes.
In order to be more conservative with the UnaffectedPackageHandle records from distro NAKs, searches for unaffected packages should be strict by default (they should not fall back to mismatched major/minor distro version rows). In other words, when no records match a distro, by default expand the search for disclosures that may match the distro, but do not expand the search for unaffected records that match may match the distro.