Skip to content

feat(detector): detect the Oracle Solaris family through vuls2 - #2659

Draft
shino wants to merge 11 commits into
masterfrom
shino/solaris-vuls2-detect
Draft

shino wants to merge 11 commits into
masterfrom
shino/solaris-vuls2-detect

Conversation

@shino

@shino shino commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Adds Oracle Solaris as a family that vuls2 detects, on top of the solaris ecosystem and the solaris-ips RangeType from MaineK00n/vuls-data-update#959 (via MaineK00n/vuls2#440).

Everything is a family- or ecosystem-keyed case next to the existing ones; the data itself comes from a vuls.db built with Solaris data, this PR adds no scanner support (vuls scan still does not know Solaris).

Changes

  • constant.Solaris ("solaris"), and GetCveContentTypes returns the new solaris CveContentType for it.
  • models: CveContentType solaris and Confidence OracleSolarisAdvisoryMatch (score 100).
  • detector/vuls2: advisoryReference maps a Solaris AdvisoryID (the public URL slug, e.g. bulletinjul2026 / cpujul2026) to https://www.oracle.com/security-alerts/<slug>.html; toCveContentType / toVuls0Confidence cases keyed on the solaris ecosystem; a source link for the CveContentType. The solaris-ips RangeType is compared through affectedrange.CompareVersions like freebsd-pkg; it is not a total order (a component absent on one side is skipped), so it is only ever used for the two-way installed-vs-bound check, noted in fold.go.
  • detector.DetectPkgCves: constant.Solaris joins the families that go to vuls2.DetectPkgs (release + packages required; data-less or trivy results recorded / skipped like the others). Previously the family fell into the Unsupported detection methods default.
  • chore(deps): pins vuls2 a218632f77bd7f (chore(deps): bump vuls-data-update for solaris MaineK00n/vuls2#440 head) and vuls-data-update 4b1dbcf3c3958e (vuls/vuls:latest (>=0.9.2 db9efcc67b00) : json payload changed in response - notFixedYet field becomes optional #959 head). go mod tidy also raises packageurl-go to v0.1.7, which percent-encodes & in purl namespaces; scanner/testdata/golden/juddiv3-war-3.3.5.war.json is regenerated with -update for that one purl (R&DR%26D).

Draft until MaineK00n/vuls-data-update#959 and MaineK00n/vuls2#440 are merged: both pins are pseudo-versions of PR heads and will be re-pinned to the merge commits before this leaves draft.

Verification

  • GOWORK=off go build ./... && go vet ./... && go test ./...: pass
  • Enum parity: the pinned vuls-data-update is ahead of nightly by exactly the solaris ecosystem and solaris-ips RangeType, which detector/vuls2 handles (check-enums compares pinned vs nightly on its daily cron, not on PRs).

Incoming

vuls2 a218632...f77bd7f (MaineK00n/vuls2):

vuls-data-update 4b1dbcf...3c3958e (MaineK00n/vuls-data-update):

🤖 Generated with Claude Code

shino and others added 11 commits September 18, 2026 11:40
…s range type

advisoryReference maps a Solaris advisory id (the slug of the public
Oracle security alert page) to its URL, toCveContentType and
toVuls0Confidence get an ecosystem-keyed case, and selectFixedIn /
comparePackStatus order solaris-ips versions with the range type's own
comparator from vuls-data-update.
GetCveContentTypes("solaris") returned nil, so the family-keyed helpers
(Titles, Summaries, CVSS scores, primary source URLs, the diff of updated
CVE info) skipped the solaris contents. Add the family constant and the
case, as for alpine.
…e test file so its _solaris suffix is not taken for a GOOS constraint
…rePackStatus

The solaris-ips range type is used with Range bounds only: no data fills
Affected.Fixed for it, so the two ordering cases never had anything to
compare, and the comparator is not a total order and should not be used
as one.
DetectPkgCves treated solaris as an unknown family and returned
"Unsupported detection methods" for any scan result that carried
packages. The family now joins the families vuls2 detects: a result with
a release and packages goes to vuls2.DetectPkgs, which resolves the
ecosystem (solaris:10 / solaris:11.<minor>) and compares the IPS package
versions with the solaris-ips range type; a data-less or trivy result is
recorded or skipped like the other recognized families.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pins vuls2 to 53b151d (head of MaineK00n/vuls2#440) and vuls-data-update
to 2fbef2f (head of MaineK00n/vuls-data-update#959): the solaris ecosystem
(GetEcosystem for family "solaris") and the solaris-ips RangeType that the
detector's solaris cases rely on. go mod tidy also raises packageurl-go to
v0.1.7, which percent-encodes "&" in purl namespaces; the juddiv3 analyzer
golden is regenerated with -update for that one purl.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…cveContentSourceLink and toVuls0Confidence

The four solaris checks were one-off functions in a file of their own. They
become rows of table tests in vendor_test.go, next to rows for the existing
families (ubuntu / alpine / fortinet / microsoft / cpe), so each function
has one test and the solaris rows read as coverage rather than an appendix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the rebased PR heads

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the reviewed PR heads

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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