feat!(detector): detect windows with vuls2#2499
Merged
Merged
Conversation
MaineK00n
force-pushed
the
MaineK00n/microsoft-vuls2
branch
from
April 13, 2026 06:06
bdf81ab to
de0bee1
Compare
MaineK00n
force-pushed
the
MaineK00n/microsoft-vuls2
branch
from
May 21, 2026 06:35
de0bee1 to
348c6d1
Compare
- Do not populate AffectedPackages for KB-only detections (keep nil) - WindowsKBFixedIns now includes KB prefix (e.g. "KB5075899") - KB IDs flow through separate kbIDs path instead of packStatuses - Update walkCriteria to return kbIDs separately from pack statuses - Fix build error from AcceptQueriesKB -> KB type rename Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MaineK00n
force-pushed
the
MaineK00n/microsoft-vuls2
branch
from
May 21, 2026 16:28
348c6d1 to
8257d23
Compare
…loit"]
vuls-data-update now extracts the advisory-level MSRC exploitability
assessment ("Publicly Disclosed:...;Exploited:...;Latest Software
Release:...;...") as the CVRF vulnerability's "exploitability" optional value.
Surface it as CveContent.Optional["exploit"], mirroring the legacy gost
Microsoft path (gost/microsoft.go: Optional["exploit"] = cve.ExploitStatus).
The Optional map is built by the new ecosystem-dispatched cveContentOptional
in vendor.go; only the Microsoft case adds "exploit", so the generic path and
non-Microsoft sources are unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaineK00n
force-pushed
the
MaineK00n/microsoft-vuls2
branch
from
May 26, 2026 13:54
571b2e2 to
2b38276
Compare
MaineK00n
marked this pull request as ready for review
May 27, 2026 09:15
logOpts became unused once Windows detection moved off gost to vuls2 (1e24818); vuls2.Detect does not take it. golangci-lint (revive unused-parameter) flagged it. Remove the parameter and update the two callers (detector.go, server/server.go). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches Windows CVE detection from the removed gost backend to the existing vuls2 backend backed by vuls.db, while preserving KB-based output fields and MSRC exploitability metadata.
Changes:
- Removes the
gostpackage, configuration surface, dependency, and call sites. - Routes Windows OS detection through
vuls2.Detect. - Adds Microsoft/Windows conversion, KB criterion handling, and tests for Windows KB detection output.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
detector/detector.go |
Routes Windows package CVE detection through vuls2 and removes gost detection path. |
detector/util.go |
Removes gost DB validation and stale gost comment. |
detector/vuls2/vuls2.go |
Adds Windows pre-conversion, KB criterion propagation, and KB output conversion. |
detector/vuls2/vendor.go |
Adds Microsoft ecosystem/source mappings and MSRC optional metadata handling. |
detector/vuls2/vuls2_test.go |
Adds Windows/Microsoft preConvert and KB postConvert coverage. |
config/config.go |
Removes Gost from global config and report validation. |
config/tomlloader.go |
Stops initializing gost config from TOML. |
config/vulnDictConf.go |
Removes GostConf and related environment variable handling. |
subcmds/server.go |
Removes gost init/validation from server command. |
subcmds/report.go |
Removes gost default init from report command. |
subcmds/report_windows.go |
Removes gost default init from Windows report command. |
subcmds/discover.go |
Removes [gost] from generated config template. |
server/server.go |
Updates server detection call to the new vuls2-only signature. |
reporter/util.go |
Removes obsolete gost integration comment. |
gost/gost.go |
Deletes gost client construction and RedHat fill helper. |
gost/microsoft.go |
Deletes legacy Microsoft gost detector. |
gost/microsoft_test.go |
Deletes legacy Microsoft gost tests. |
gost/redhat.go |
Deletes legacy RedHat gost conversion/enrichment code. |
gost/redhat_test.go |
Deletes legacy RedHat gost tests. |
gost/pseudo.go |
Deletes no-op gost pseudo client. |
gost/util.go |
Deletes shared gost HTTP/helper utilities. |
go.mod |
Removes direct github.com/vulsio/gost dependency. |
go.sum |
Removes gost checksums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
https://github.com/future-architect/vuls/blob/958aab43b7093303f757664efc947d159e421f0e/.github/dependabot.yml has two gost entiries. It does no harm but better to remove? |
…gomod groups gost is removed by this PR; go-exploitdb was removed earlier in #2517. Neither is in go.mod anymore, so the `vuls` group patterns and the `others` group exclude-patterns no longer match anything. Remove the stale entries. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Author
… kb detection The existing "microsoft kb detection" case only exercised the unapplied-based evaluation path of the KB criterion (Accepts.KB.Unapplied=true). The covered-based path (Accepts.KB.Covered=true) is the more common real-world detection pattern: the host has applied KBs that produce a non-empty CoveredKBs, and the criterion's fix-KB is not in that set so it is reported as vulnerable. Rename the existing case to "microsoft kb detection: unapplied" for parallel clarity, and add a new "microsoft kb detection: covered" case that mirrors the structure with Accepts.KB.Covered=true. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
If this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.
What did you implement:
Switch Windows OS CVE detection from
gosttovuls2, readingvuls.db(built by
vuls-data-update, distributed viavuls-data-db).CveContent.Optional["exploit"](parity with the previous gost output).
Breaking change: Windows detection no longer depends on gost; it requires a
vuls.dbcontaining themicrosoft-*sources (see vuls-data-db#125 / #158).Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Ran detection on the
vulsio/integrationWindows scan-result fixtures(26 hosts) with both backends — the current gost-based detector and the new
vuls2-based detector against a
microsoft-*vuls.db— and diffed the detectedCVE set per host. The same comparison runs in CI as a guard (vuls-data-db#158).
Per-host diff (gost-only = gost reports but vuls2 does not; vuls2-only = the reverse)
gost-only causes (all non-vulnerable on these hosts)
vuls2-only causes (real coverage gain; no false positive found in sampling)
Information parity
For CVEs reported by both backends, the vuls2 output carries the same or richer
per-CVE content: title, CVSS (full vector), severity, references, and the MSRC
"Exploit Status" preserved under
CveContent.Optional["exploit"].Known boundary (not a regression)
vuls2 matches a product only when the host scan provides evidence the product is
present (an installed package, the OS release, or a KB that carries that product).
For "feature on OS" products such as
.NET Framework x.y on Windows Server <ver>(the 5 Server 2025 entries above), if the scan does not surface the relevant .NET
KB/package, vuls2 does not match — whereas gost matches by OS-name substring
regardless of whether the feature is installed. This is a scanner-input
completeness consideration; vuls2's behavior here is the more conservative/precise one.
Conclusion
Net improvement: removes gost false positives and expands real coverage, with no
loss of per-CVE information and no detection-logic regression found.
Checklist:
You don't have to satisfy all of the following.
make fmtmake testIs this ready for review?: YES
Reference