Skip to content

Commit 31d51de

Browse files
shinoclaude
andcommitted
docs(detector/vuls2): refresh enrichAdvisories/enrichCisco comments
Address Copilot review on PR #2581: - enrichAdvisories doc comment now notes it enriches Cisco CveContent too, not just KEV. - enrichCisco's "already present" note no longer cites the CPE detection path as the example (that path's sparse Cisco content is now deleted); make it generic (a higher-priority Cisco source on a prior call). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 83a133c commit 31d51de

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

detector/vuls2/vendor.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,8 @@ func enrichVulnerabilities(vi *models.VulnInfo, vulns []dbTypes.VulnerabilityDat
11771177
}
11781178
}
11791179

1180-
// enrichAdvisories enriches VulnInfo with advisory-based data (KEV).
1180+
// enrichAdvisories enriches VulnInfo with advisory-based data: KEV, and the
1181+
// Cisco CveContent (selected by source priority in the loop below).
11811182
func enrichAdvisories(vi *models.VulnInfo, advisories []dbTypes.VulnerabilityDataAdvisory) {
11821183
for _, a := range advisories {
11831184
for sourceID, rootMap := range a.Contents {
@@ -1399,8 +1400,8 @@ func enrichNVD(vi *models.VulnInfo, rootMap map[dataTypes.RootID][]vulnerability
13991400
// vulnerability stub, so this reads advisory roots. Cisco carries no CVSS — only
14001401
// a vendor SIR, which the detection path surfaces as the DistroAdvisory severity
14011402
// — so no CVSS is set here, matching go-cve-dictionary's ConvertCiscoToModel.
1402-
// When a cisco CveContent is already present (e.g. from the CPE detection path)
1403-
// it is left in place.
1403+
// When a cisco CveContent is already present (e.g. populated by a
1404+
// higher-priority Cisco source on a prior call) it is left in place.
14041405
func enrichCisco(vi *models.VulnInfo, rootMap map[dataTypes.RootID][]advisoryTypes.Advisory) {
14051406
if _, ok := vi.CveContents[models.Cisco]; ok {
14061407
return

0 commit comments

Comments
 (0)