Skip to content

feat(detector): enrich MITRE CVE v5 via vuls2#2586

Merged
MaineK00n merged 1 commit into
masterfrom
MaineK00n/enrich-mitre-cve-v5
Jun 26, 2026
Merged

feat(detector): enrich MITRE CVE v5 via vuls2#2586
MaineK00n merged 1 commit into
masterfrom
MaineK00n/enrich-mitre-cve-v5

Conversation

@MaineK00n

@MaineK00n MaineK00n commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

What did you implement:

Add MITRE CVE v5 (mitre-cve-v5) as a vuls2 enrich data source and remove the MITRE path from go-cve-dictionary. MITRE CveContent is now sourced from the vuls2 DB via the enrich pipeline rather than FillCvesWithGoCVEDictionary.

This mirrors the NVD migration in #2575 (feat!(detector): route NVD to vuls2).

Motivation

We are progressively moving CVE enrichment off go-cve-dictionary and onto vuls2's enrich pipeline (KEV, exploits, RedHat CVE, NVD, ENISA EUVD, …). MITRE CVE v5 is the next source to migrate.

Changes

  • Bump vuls-data-update to the revision that adds the SSVC content field (feat(extract/mitre/cve/v5): extract SSVC from CNA/ADP metrics MaineK00n/vuls-data-update#862). vuls2 is kept at master's pinned version (Go MVS links the single newer vuls-data-update across the build).
  • detector/vuls2/vuls2.go: add sourceTypes.MitreCVEV5 to the enrich DataSources filter.
  • detector/vuls2/vendor.go: add enrichMitreCVE and a Mitre case in cveContentSourceLink. MITRE content is emitted one entry per CNA/ADP source (rendered as mitre(<source>)) so each source's CVSS, CWE, references, and SSVC decision point are reported separately. SSVC options (Exploitation / Automatable / Technical Impact) are mapped to models.SSVC via mitreSSVC.
  • detector/detector.go / models/utils.go: drop ConvertMitreToModel and its use in FillCvesWithGoCVEDictionary.
  • testdata: add a positive mitre-cve-v5 enrich test (CVE-2023-44487, including a CISA-ADP SSVC entry); move the "datasource not in filter" case to a new nvd-api-cve fixture.

Notes

  • SSVC and CNA/ADP source labels are now preserved (previously lost when first drafted, before vuls-data-update#862). CVSS, CWE, references, summary, and dates are mapped per source.
  • Requires the DB to carry mitre-cve-v5 data extracted with vuls-data-update#862 (db pipeline: ci(db): enable mitre-cve-v5 in db-main vulsio/vuls-data-db#177).

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • go build ./...
  • go vet ./detector/... ./models/...
  • make fmt (gofmt clean on touched files)
  • go test ./detector/... ./models/... — all pass, including the mitre-cve-v5 Test_enrich case (asserts source-split contents + SSVC).

Checklist:

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR

Is this ready for review?: NO

🤖 Generated with Claude Code

@MaineK00n MaineK00n self-assigned this Jun 24, 2026
@MaineK00n MaineK00n force-pushed the MaineK00n/enrich-mitre-cve-v5 branch 2 times, most recently from 96bb598 to adac705 Compare June 24, 2026 06:49
@MaineK00n MaineK00n changed the title feat(detector): enrich MITRE CVE v5 via vuls2 instead of go-cve-dictionary feat(detector): enrich MITRE CVE v5 via vuls2 Jun 24, 2026
MaineK00n added a commit to vulsio/vuls-data-db that referenced this pull request Jun 24, 2026
Uncomment vuls-data-extracted-mitre-cve-v5 in db-main.mk so MITRE CVE v5 is
included in the main DB build. This backs the vuls MITRE enrich support
(future-architect/vuls#2586).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaineK00n MaineK00n force-pushed the MaineK00n/enrich-mitre-cve-v5 branch 5 times, most recently from 770a8c9 to 7f9fc92 Compare June 26, 2026 02:32
@MaineK00n MaineK00n marked this pull request as ready for review June 26, 2026 03:56
@MaineK00n MaineK00n requested a review from Copilot June 26, 2026 03:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrate MITRE CVE v5 enrichment off go-cve-dictionary and into the vuls2 enrich pipeline, enabling per-CNA/ADP source CveContent entries (including SSVC) sourced from the vuls2 DB.

Changes:

  • Add mitre-cve-v5 to the vuls2 enrich datasource filter and implement MITRE v5 enrichment mapping (incl. SSVC + per-source splitting).
  • Remove the legacy go-cve-dictionary MITRE conversion path.
  • Bump vuls-data-update / vuls2 deps and add/update enrich fixtures + tests for MITRE v5 and datasource filtering.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
models/utils.go Removes legacy go-cve-dictionary MITRE→model conversion helper.
detector/detector.go Stops filling MITRE CveContents from go-cve-dictionary in FillCvesWithGoCVEDictionary.
detector/vuls2/vuls2.go Adds sourceTypes.MitreCVEV5 to vuls2 enrich datasource filter.
detector/vuls2/vendor.go Adds MITRE v5 enrichment (enrichMitreCVE), SSVC mapping, and MITRE source link handling.
detector/vuls2/vuls2_test.go Adds a positive MITRE v5 enrich test and makes comparisons order-insensitive for multi-entry contents.
detector/vuls2/testdata/fixtures/enrich/nvd-api-cve/datasource.json New fixture datasource for “not in enrich filter” coverage.
detector/vuls2/testdata/fixtures/enrich/nvd-api-cve/data/CVE-2020-0001.json New fixture CVE payload for “not in enrich filter” coverage.
detector/vuls2/testdata/fixtures/enrich/mitre-cve-v5/data/CVE-2024-1102.json Removes prior “filtered out” MITRE fixture now that MITRE is enabled.
detector/vuls2/testdata/fixtures/enrich/mitre-cve-v5/data/CVE-2023-44487.json Updates MITRE fixture to include SSVC + container role metadata.
go.mod Bumps vuls-data-update and vuls2 versions.
go.sum Updates module sums for the bumped dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread detector/detector.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Comment thread detector/detector.go Outdated
Comment thread detector/vuls2/vuls2_test.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.

@MaineK00n MaineK00n requested a review from shino June 26, 2026 04:55

@shino shino left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add MITRE CVE v5 (mitre-cve-v5) as a vuls2 enrich data source and remove the
MITRE path from FillCvesWithGoCVEDictionary so MITRE CveContent is now sourced
from the vuls2 DB. This mirrors the NVD migration in #2575.

MITRE content is emitted one entry per CNA/ADP source (rendered as
mitre(<source>)) so each source's CVSS, CWE, references, and SSVC decision
point are reported separately.

- bump vuls-data-update to the revision adding the SSVC content field (#862).
- vuls2.go: add sourceTypes.MitreCVEV5 to the enrich DataSources filter.
- vendor.go: add enrichMitreCVE (source-split, with SSVC via mitreSSVC) and a
  Mitre case in cveContentSourceLink.
- detector.go / models/utils.go: drop ConvertMitreToModel and its usage.
- testdata: add a positive mitre-cve-v5 enrich test (CVE-2023-44487, with a
  CISA-ADP SSVC); move the "datasource not in filter" case to nvd-api-cve.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaineK00n MaineK00n force-pushed the MaineK00n/enrich-mitre-cve-v5 branch from 942cb3b to a993991 Compare June 26, 2026 05:41
@MaineK00n MaineK00n merged commit 61f32a4 into master Jun 26, 2026
8 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/enrich-mitre-cve-v5 branch June 26, 2026 05:51
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.

3 participants