mirror of
https://github.com/0xMarcio/cve.git
synced 2026-10-27 16:51:03 +00:00
Prefer positive CVSS assessments
This commit is contained in:
1 parent
95b818930a
commit
7a33d182ac
13 files changed
+50
-12
No files matched your search
@@ -328,6 +328,27 @@ class MetadataSourceTests(unittest.TestCase):
|
||||
rows = sync_cve_metadata.cve_program_metrics(record)
|
||||
self.assertEqual([row[0] for row in rows], ["4.0", "3.1", "2.0"])
|
||||
|
||||
def test_positive_assessment_outranks_conflicting_zero(self) -> None:
|
||||
rows = sync_cve_metadata.merge_metrics(
|
||||
[[
|
||||
"4.0",
|
||||
0.0,
|
||||
"NONE",
|
||||
"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N",
|
||||
"Wikimedia Foundation",
|
||||
"CVE Program CNA",
|
||||
]],
|
||||
[[
|
||||
"3.1",
|
||||
6.1,
|
||||
"MEDIUM",
|
||||
"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
|
||||
"[email protected]",
|
||||
"Primary",
|
||||
]],
|
||||
)
|
||||
self.assertEqual(rows[0][1:3], [6.1, "MEDIUM"])
|
||||
|
||||
def test_github_advisory_requires_reproducible_poc_material(self) -> None:
|
||||
advisory = """### POC
|
||||
|
||||
|
||||
Reference in new issue
Block a user