@@ -41,6 +41,8 @@ def test_dependency_track_parser_has_many_findings(self):
4141 self .assertIsNone (findings [1 ].unsaved_vulnerability_ids )
4242 self .assertEqual (1 , len (findings [2 ].unsaved_vulnerability_ids ))
4343 self .assertEqual ("CVE-2016-2097" , findings [2 ].unsaved_vulnerability_ids [0 ])
44+ self .assertEqual ("900991f6-335a-49cb-9bf6-87b545f960ce" , findings [2 ].unique_id_from_tool )
45+ self .assertEqual ("900991f6-335a-49cb-9bf6-87b545f960ce" , findings [2 ].vuln_id_from_tool )
4446 self .assertTrue (findings [2 ].false_p )
4547 self .assertTrue (findings [2 ].is_mitigated )
4648 self .assertFalse (findings [2 ].active )
@@ -63,7 +65,7 @@ def test_dependency_track_parser_v3_8_0(self):
6365 findings = parser .get_findings (testfile , Test ())
6466 self .assertEqual (9 , len (findings ))
6567 self .assertTrue (all (item .file_path is not None for item in findings ))
66- self .assertTrue (all (item .vuln_id_from_tool is not None for item in findings ))
68+ self .assertTrue (all (item .unique_id_from_tool is not None for item in findings ))
6769
6870 def test_dependency_track_parser_findings_with_alias (self ):
6971 with (
@@ -74,8 +76,11 @@ def test_dependency_track_parser_findings_with_alias(self):
7476
7577 self .assertEqual (12 , len (findings ))
7678 self .assertTrue (all (item .file_path is not None for item in findings ))
79+ self .assertTrue (all (item .unique_id_from_tool is not None for item in findings ))
7780 self .assertTrue (all (item .vuln_id_from_tool is not None for item in findings ))
7881 self .assertIn ("CVE-2022-42004" , findings [0 ].unsaved_vulnerability_ids )
82+ self .assertIn ("DSA-5283-1" , findings [0 ].unsaved_vulnerability_ids )
83+ self .assertIn ("GHSA-rgv9-q543-rqg4" , findings [0 ].unsaved_vulnerability_ids )
7984
8085 def test_dependency_track_parser_findings_with_empty_alias (self ):
8186 with (
@@ -93,6 +98,7 @@ def test_dependency_track_parser_findings_with_cvssV3_score(self):
9398 findings = parser .get_findings (testfile , Test ())
9499 self .assertEqual (12 , len (findings ))
95100 self .assertTrue (all (item .file_path is not None for item in findings ))
101+ self .assertTrue (all (item .unique_id_from_tool is not None for item in findings ))
96102 self .assertTrue (all (item .vuln_id_from_tool is not None for item in findings ))
97103 self .assertIn ("CVE-2022-42004" , findings [0 ].unsaved_vulnerability_ids )
98104 self .assertEqual (8.3 , findings [0 ].cvssv3_score )
0 commit comments