From a5bf05b954331bceb43e72e020690299e4951911 Mon Sep 17 00:00:00 2001 From: Jess Lowe Date: Fri, 10 Jul 2026 04:15:22 +0000 Subject: [PATCH 1/2] fix bug where descriptions using 'en-US' instead of 'en' are not getting parsed --- vulnfeeds/cmd/combine-to-osv/main.go | 6 ++++++ vulnfeeds/models/cve.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/vulnfeeds/cmd/combine-to-osv/main.go b/vulnfeeds/cmd/combine-to-osv/main.go index e1c97a81c07..f4e19205273 100644 --- a/vulnfeeds/cmd/combine-to-osv/main.go +++ b/vulnfeeds/cmd/combine-to-osv/main.go @@ -216,6 +216,12 @@ func combineIntoOSV(cve5osv map[models.CVEID]*osvschema.Vulnerability, nvdosv ma // combineTwoOSVRecords takes two osv records and combines them into one func combineTwoOSVRecords(cve5 *osvschema.Vulnerability, nvd *osvschema.Vulnerability) *osvschema.Vulnerability { baseOSV := cve5 + if baseOSV.GetDetails() == "" && nvd.GetDetails() != "" { + baseOSV.Details = nvd.Details + } + if baseOSV.GetSummary() == "" && nvd.GetSummary() != "" { + baseOSV.Summary = nvd.Summary + } combinedAffected := pickAffectedInformation(cve5.GetAffected(), nvd.GetAffected()) baseOSV.Affected = combinedAffected diff --git a/vulnfeeds/models/cve.go b/vulnfeeds/models/cve.go index 875896834dd..f2393c004a1 100644 --- a/vulnfeeds/models/cve.go +++ b/vulnfeeds/models/cve.go @@ -146,7 +146,7 @@ type CVE5 struct { func EnglishDescription(descriptions []LangString) string { for _, desc := range descriptions { - if desc.Lang == "en" { + if desc.Lang == "en" || strings.HasPrefix(desc.Lang, "en-") { return desc.Value } } From 5053d75581c842e2fd2087ddbc3f78956e19efcc Mon Sep 17 00:00:00 2001 From: Jess Lowe Date: Fri, 10 Jul 2026 07:04:01 +0000 Subject: [PATCH 2/2] fix lint --- vulnfeeds/cmd/combine-to-osv/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vulnfeeds/cmd/combine-to-osv/main.go b/vulnfeeds/cmd/combine-to-osv/main.go index f4e19205273..9b7b3080103 100644 --- a/vulnfeeds/cmd/combine-to-osv/main.go +++ b/vulnfeeds/cmd/combine-to-osv/main.go @@ -217,10 +217,10 @@ func combineIntoOSV(cve5osv map[models.CVEID]*osvschema.Vulnerability, nvdosv ma func combineTwoOSVRecords(cve5 *osvschema.Vulnerability, nvd *osvschema.Vulnerability) *osvschema.Vulnerability { baseOSV := cve5 if baseOSV.GetDetails() == "" && nvd.GetDetails() != "" { - baseOSV.Details = nvd.Details + baseOSV.Details = nvd.GetDetails() } if baseOSV.GetSummary() == "" && nvd.GetSummary() != "" { - baseOSV.Summary = nvd.Summary + baseOSV.Summary = nvd.GetSummary() } combinedAffected := pickAffectedInformation(cve5.GetAffected(), nvd.GetAffected())