Skip to content

fix: do not expand distro query on distro UAPs#3421

Draft
willmurphyscode wants to merge 3 commits intoanchore:mainfrom
willmurphyscode:chore-sles-naks-dbtests
Draft

fix: do not expand distro query on distro UAPs#3421
willmurphyscode wants to merge 3 commits intoanchore:mainfrom
willmurphyscode:chore-sles-naks-dbtests

Conversation

@willmurphyscode
Copy link
Copy Markdown
Contributor

@willmurphyscode willmurphyscode commented May 5, 2026

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.

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>
@willmurphyscode willmurphyscode added the bug Something isn't working label May 5, 2026
wagoodman
wagoodman previously approved these changes May 5, 2026
@willmurphyscode willmurphyscode marked this pull request as draft May 5, 2026 21:37
@willmurphyscode willmurphyscode dismissed wagoodman’s stale review May 5, 2026 21:40

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>
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.

False Positive: GHSA-jfmj-5v4g-7637 (CVE-2024-5569) python3-zipp due to Syft noise and mismatch of package name

2 participants