File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -532,9 +532,9 @@ def test_query_purl(self):
532
532
self .assert_results_equal ({'vulns' : another_expected }, response .json ())
533
533
534
534
expected_deb = [
535
- self ._get ('CVE-2018-25047' ),
536
- self ._get ('CVE-2023-28447' ),
537
- self ._get ('CVE-2024-35226' ),
535
+ self ._get ('DEBIAN- CVE-2018-25047' ),
536
+ self ._get ('DEBIAN- CVE-2023-28447' ),
537
+ self ._get ('DEBIAN- CVE-2024-35226' ),
538
538
self ._get ('DSA-5830-1' ),
539
539
]
540
540
@@ -581,7 +581,6 @@ def test_query_purl(self):
581
581
}
582
582
}),
583
583
timeout = _TIMEOUT )
584
-
585
584
self .assert_results_equal ({'vulns' : expected_deb }, response .json ())
586
585
587
586
def test_query_purl_with_version_trailing_zeroes (self ):
Original file line number Diff line number Diff line change @@ -346,7 +346,10 @@ def source_path(source_repo, bug):
346
346
"""Get the source path for an osv.Bug."""
347
347
source_name , source_id = parse_source_id (bug .source_id )
348
348
if source_name == 'oss-fuzz' and len (bug .project ) > 0 :
349
- path = os .path .join (bug .project [0 ], bug .id () + source_repo .extension )
349
+ # Because we populate the Github link for matching, the shortest
350
+ # name is the package name.
351
+ project = sorted (bug .project , key = len )[0 ]
352
+ path = os .path .join (project , bug .id () + source_repo .extension )
350
353
if source_repo .directory_path :
351
354
path = os .path .join (source_repo .directory_path , path )
352
355
You can’t perform that action at this time.
0 commit comments