Skip to content

Commit a2307e8

Browse files
authored
fix: no severity score on Debian CVEs (#4042)
1 parent 81f681c commit a2307e8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

vulnfeeds/cmd/debian/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,13 @@ func generateOSVFromDebianTracker(debianData DebianSecurityTrackerData, debianRe
127127
continue
128128
}
129129
v, ok := osvCves[cveID]
130+
currentNVDCVE := allCVEs[cves.CVEID(cveID)]
130131
if !ok {
131132
v = &vulns.Vulnerability{
132133
Vulnerability: osvschema.Vulnerability{
133134
ID: "DEBIAN-" + cveID,
134135
Upstream: []string{cveID},
135-
Published: allCVEs[cves.CVEID(cveID)].CVE.Published.Time,
136+
Published: currentNVDCVE.CVE.Published.Time,
136137
Details: cveData.Description,
137138
References: []osvschema.Reference{
138139
{
@@ -142,6 +143,7 @@ func generateOSVFromDebianTracker(debianData DebianSecurityTrackerData, debianRe
142143
},
143144
},
144145
}
146+
v.AddSeverity(currentNVDCVE.CVE.Metrics)
145147
osvCves[cveID] = v
146148
}
147149

vulnfeeds/cmd/debian/main_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func TestGenerateOSVFromDebianTracker(t *testing.T) {
124124
},
125125
},
126126
References: []osvschema.Reference{{Type: "ADVISORY", URL: "https://security-tracker.debian.org/tracker/CVE-2016-1585"}},
127+
Severity: []osvschema.Severity{{Type: "CVSS_V3", Score: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}},
127128
},
128129
},
129130
"CVE-2017-6507": {
@@ -156,6 +157,7 @@ func TestGenerateOSVFromDebianTracker(t *testing.T) {
156157
},
157158
},
158159
References: []osvschema.Reference{{Type: "ADVISORY", URL: "https://security-tracker.debian.org/tracker/CVE-2017-6507"}},
160+
Severity: []osvschema.Severity{{Type: "CVSS_V3", Score: "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"}},
159161
},
160162
},
161163
}

0 commit comments

Comments
 (0)