@@ -1388,11 +1388,11 @@ def test_scanpipe_fetch_scores_pipeline_integration(self, mock_is_available):
13881388 "scoring_tool_documentation_url" : "https://github.com/[trunc...]" ,
13891389 "score_date" : "2025-07-24T18:50:16Z" ,
13901390 }
1391- with mock .patch ("scorecode.ossf_scorecard.fetch_scorecard_info " ) as fetch :
1391+ with mock .patch ("scorecode.ossf_scorecard.fetch_scorecard " ) as fetch :
13921392 fetch .return_value = PackageScore (** package_score_data )
1393- exitcode , out = pipeline .execute ()
1394-
1393+ exitcode , out = pipeline .execute ()
13951394 self .assertEqual (0 , exitcode , msg = out )
1395+
13961396 package1 .refresh_from_db ()
13971397 scorecard_entry = package1 .scores .filter (scoring_tool = "ossf-scorecard" ).first ()
13981398 self .assertIsNotNone (scorecard_entry )
@@ -1617,6 +1617,31 @@ def test_scanpipe_load_sbom_pipeline_cyclonedx_with_dependencies_integration(sel
16171617 dependency = project1 .discovereddependencies .all ()[0 ]
16181618 self .assertEqual ("bom.1.4.json" , str (dependency .datafile_resource ))
16191619
1620+ def test_scanpipe_load_sbom_pipeline_cyclonedx_with_vulnerabilities (self ):
1621+ pipeline_name = "load_sbom"
1622+ project1 = make_project ()
1623+
1624+ input_location = (
1625+ self .data / "cyclonedx" / "python-3.13.0-vulnerabilities.cdx.json"
1626+ )
1627+ project1 .copy_input_from (input_location )
1628+
1629+ run = project1 .add_pipeline (pipeline_name )
1630+ pipeline = run .make_pipeline_instance ()
1631+
1632+ exitcode , out = pipeline .execute ()
1633+ self .assertEqual (0 , exitcode , msg = out )
1634+
1635+ self .assertEqual (1 , project1 .discoveredpackages .count ())
1636+ package = project1 .discoveredpackages .get ()
1637+ expected = [
1638+ {
1639+ "vulnerability_id" : "CVE-2005-2541" ,
1640+ "summary" : "Tar 1.15.1 does not properly warn the user when..." ,
1641+ }
1642+ ]
1643+ self .assertEqual (expected , package .affected_by_vulnerabilities )
1644+
16201645 @mock .patch ("scanpipe.pipes.purldb.request_post" )
16211646 @mock .patch ("uuid.uuid4" )
16221647 def test_scanpipe_deploy_to_develop_pipeline_integration (
@@ -1747,20 +1772,6 @@ def test_scanpipe_deploy_to_develop_pipeline_with_about_file(
17471772 )
17481773 self .assertIn (expected , message .description )
17491774
1750- def test_scanpipe_deploy_to_develop_pipeline_without_selected_groups (self ):
1751- pipeline_name = "map_deploy_to_develop"
1752- project1 = make_project (name = "Analysis" )
1753-
1754- data_dir = self .data / "d2d" / "about_files"
1755- project1 .copy_input_from (data_dir / "from-with-about-file.zip" )
1756- project1 .copy_input_from (data_dir / "to-with-jar.zip" )
1757-
1758- run = project1 .add_pipeline (pipeline_name = pipeline_name )
1759- pipeline = run .make_pipeline_instance ()
1760-
1761- exitcode , out = pipeline .execute ()
1762- self .assertEqual (0 , exitcode , msg = out )
1763-
17641775 @mock .patch ("scanpipe.pipes.purldb.request_post" )
17651776 @mock .patch ("scanpipe.pipes.purldb.is_available" )
17661777 def test_scanpipe_populate_purldb_pipeline_integration (
0 commit comments