fix: EPSS source precision, reconciling stats totals, known-issues fetch for migrated KB pages#18
Merged
Merged
Conversation
…KB known-issues retrieval - Round EPSS score/percentile to the source's 5-decimal precision once at parse time so no output view can surface float-repr artifacts. - Add explicit Unrated / Unspecified buckets to the include_stats severity and impact breakdowns so bucket counts always sum to the reported total (entries like Chromium CVEs ship without a severity rating). - Known-issues fetch: support.microsoft.com moved KB articles to /servicing/os/... pages, adding a second redirect hop and a new markup generation (details/summary blocks, strong labels under an h3 heading). Follow a bounded, validated redirect chain (MAX_REDIRECT_HOPS = 3) and parse both markup generations; the honest three-way status contract (published / none_published / unavailable) is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
What
Three server data-quality fixes:
EPSS values rounded to source precision. FIRST.org publishes EPSS scores/percentiles as 5-decimal strings; we now round once at parse time so no output view (JSON, CSV, markdown,
min_epssfiltering) can ever surface float-repr artifacts like0.016540000000000003.include_statsbreakdowns now reconcile. Entries that ship without a severity rating or impact category (e.g. Chromium CVEs) were invisible inby_severity/by_impact, so bucket counts didn't sum tototaland every consumer had to guess why. They now get explicitUnrated/Unspecifiedbuckets — only emitted when non-zero, so fully-rated months are byte-identical to before. Opt-in output only; the default JSON shape is unchanged.Known-issues retrieval works again for migrated KB pages. support.microsoft.com moved KB articles to
/servicing/os/...canonical URLs, which added a second redirect hop (/help/{kb}→/topic/...→/servicing/...) and a new markup generation (<details>/<summary>issue blocks with<strong>labels under an<h3>heading). The old code followed exactly one hop, so lookups like KB5094123 degraded tounavailable. Now: a bounded, per-hop-validated redirect chain (MAX_REDIRECT_HOPS = 3, same-host https only, never auto-followed) and both markup generations parsed. The honest three-way status contract (published/none_published/unavailable) is unchanged, and fetch failures are still never cached.Verification
pytest --run-live: 307 passed — including the known-issues drift canary against the real support site; KB5094123 now returnspublishedwith 3 structured issues end-to-end🤖 Generated with Claude Code