diff --git a/scanpipe/pipelines/windows_docker.py b/scanpipe/pipelines/windows_docker.py index 97a655c31..040be9745 100644 --- a/scanpipe/pipelines/windows_docker.py +++ b/scanpipe/pipelines/windows_docker.py @@ -20,12 +20,12 @@ # ScanCode.io is a free software code scanning tool from nexB Inc. and others. # Visit https://github.com/nexB/scancode.io for support and download. -from scanpipe.pipelines import docker +from scanpipe.pipelines.docker import Docker from scanpipe.pipes import docker from scanpipe.pipes import windows -class WindowsDocker(docker.Docker): +class WindowsDocker(Docker): """ A pipeline to analyze a Windows Docker image. """ @@ -35,10 +35,11 @@ def steps(cls): return ( cls.extract_images, cls.extract_layers, - cls.find_images_linux_distro, + cls.find_images_os_and_distro, cls.collect_images_information, cls.collect_and_create_codebase_resources, cls.collect_and_create_system_packages, + cls.tag_known_software_packages, cls.tag_uninteresting_codebase_resources, cls.tag_empty_files, cls.scan_for_application_packages, @@ -47,9 +48,12 @@ def steps(cls): cls.tag_not_analyzed_codebase_resources, ) + def tag_known_software_packages(self): + windows.tag_known_software(self.project) + def tag_uninteresting_codebase_resources(self): """ Flag remaining files not from a system package. """ docker.tag_whiteout_codebase_resources(self.project) - windows.tag_uninteresting_codebase_resources(self.project) + windows.tag_uninteresting_windows_codebase_resources(self.project) diff --git a/scanpipe/tests/test_commands.py b/scanpipe/tests/test_commands.py index 2c2ed3adf..862cbf25f 100644 --- a/scanpipe/tests/test_commands.py +++ b/scanpipe/tests/test_commands.py @@ -78,7 +78,7 @@ def test_scanpipe_pipelines_pipeline_graph_output_dot(self): self.assertIn('"extract_images"[label=<extract_images>', output_dot) self.assertIn('"extract_layers"[label=<extract_layers>', output_dot) self.assertIn("extract_images -> extract_layers;", output_dot) - self.assertIn("extract_layers -> find_images_linux_distro;", output_dot) + self.assertIn("extract_layers -> find_images_os_and_distro;", output_dot) def test_scanpipe_management_command_create_project_base(self): out = StringIO() diff --git a/setup.py b/setup.py index 6acaec642..6fb8bf435 100755 --- a/setup.py +++ b/setup.py @@ -57,6 +57,7 @@ ], "scancodeio_pipelines": [ "docker = scanpipe.pipelines.docker:Docker", + "windows_docker = scanpipe.pipelines.windows_docker:WindowsDocker", "load_inventory = scanpipe.pipelines.load_inventory:LoadInventory", "root_filesystems = scanpipe.pipelines.root_filesystems:RootFS", "scan_codebase = scanpipe.pipelines.scan_codebase:ScanCodebase",