Skip to content

fix(msrc): an entry is found by the products it affects, not only by its title - #56

Merged
maksimtech merged 2 commits into
mainfrom
fix/msrc-matches-the-products-an-entry-affects
Oct 17, 2026
Merged

maksimtech merged 2 commits into
mainfrom
fix/msrc-matches-the-products-an-entry-affects

Conversation

@maksimtech

Copy link
Copy Markdown
Owner

The defect (audit finding PR-02)

patchradar scan "windows 11" found nothing in MSRC. The October 2026 document lists 1,057 entries affecting a Windows 11 product, and KB5127648, October's Windows 11 cumulative update, was installed on the machine that ran the scan.

MSRC titles an entry by component ("Windows Kernel Information Disclosure Vulnerability"). The operating system is named only in the document's ProductTree, which each entry points into through ProductStatuses. The keyword was matched against title and notes only. The September fixture had no ProductTree, so no test could notice.

Fix

An entry is also kept when the keyword names one of the products the entry lists as Known Affected (ProductStatuses Type 3). The match uses the same whole-word rule as titles (keyword_pattern). The matching product IDs are computed once per monthly document.

Measured on the whole real October 2026 document, served locally

keyword before after time
windows 11 0 1,057 ~195 ms (first run 400)
windows 10 0 980 ~195 ms
windows server 4 1,099 ~195 ms
windows 944 1,171 ~195 ms
curl / excel 1 / 71 1 / 71 unchanged

1,057 is exactly the number of entries the audit counted with a Windows 11 product in ProductStatuses.

Tests

  • Fixture: tests/fixtures/msrc_2026_oct_excerpt_recorded.json, from the real document downloaded on 2026-10-17. It keeps three entries verbatim and the FullProductNames they point to (62 KB):
  • Product tests: windows 11 finds the kernel entry, and windows server finds the cluster entry and not Excel. Both failed first.
  • Tests written after the code, checked by mutation (each fails when its rule is removed):
    • product names are matched as words (win finds none);
    • only Known Affected counts. This uses a derived entry with its status Type changed, declared as such, because the real document holds only Type 3 (2,133 of them).
  • Mutation check: all four mutations of the change are caught.
  • Windows: 2096 passed. WSL: 2055 passed, 45 skipped (UI tests without node). ruff and mypy: clean.

Not in this PR: reporting the KB of the remediation for the matched product, and comparing it with installed updates. That is a follow-up.

🤖 Generated with Claude Code

…its title

`patchradar scan "windows 11"` found nothing in MSRC. MSRC titles an
entry by component and names the operating system only in the
document's ProductTree, which each entry points into through its
ProductStatuses, and the keyword was matched against the title and the
notes alone. On the October 2026 document, which lists 1,057 entries
affecting a Windows 11 product, `windows 11` and `windows 10` found 0
and `windows server` 4.

An entry is now also kept when the keyword names, by the same
whole-word rule as titles, one of the products it lists as Known
Affected (Type 3). Run on the whole October document, served locally:
1,057, 980 and 1,099, in the same ~195 ms; curl and excel unchanged.

Tests read a recorded excerpt of that document: three entries verbatim
(a Windows Kernel CVE affecting Windows 11 26H2, a Windows Server-only
one, an Excel one) and the product names they point to. The two
product tests failed first; the word rule and the Type 3 rule, written
after, each fail when the rule is removed. The status test uses a
derived entry, declared as such: the document holds only Type 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codspeed

codspeed Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 11 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 17 untouched benchmarks


Comparing fix/msrc-matches-the-products-an-entry-affects (e04d262) with main (47e0ed8)

Open in CodSpeed

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

codecov/patch on #56: the `continue` past a product that is not an
object had no test. A derived excerpt, the recorded one with a string at
the head of FullProductName, still finds the kernel entry for
"windows 11" — the robustness the collector already keeps per
vulnerability entry, now held per product too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@maksimtech
maksimtech merged commit 314e04a into main Oct 17, 2026
25 checks passed
@maksimtech
maksimtech deleted the fix/msrc-matches-the-products-an-entry-affects branch October 17, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant