Skip to content

Commit

Permalink
Rename pipeline CheckVulnerabilities to FindVulnerabilities #101
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Nov 4, 2022
1 parent fc0aff3 commit 6b069c3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
7 changes: 1 addition & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ Changelog
v31.1.0 (unreleased)
--------------------

- Add a new "inspect manifest" pipeline to resolve packages from manifest, lockfile,
and SBOM. The resolved packages are created as discovered packages.
Support PyPI "requirements.txt" files and AboutCode ".ABOUT" files
https://github.com/nexB/scancode.io/issues/284

- Add a new "check vulnerabilities" pipeline to lookup vulnerabilities in the
- Add a new "find vulnerabilities" pipeline to lookup vulnerabilities in the
VulnerableCode database for all project discovered packages.
Vulnerability data is stored in the extra_data field of each package.
More details about VulnerableCode at https://github.com/nexB/vulnerablecode/
Expand Down
16 changes: 8 additions & 8 deletions docs/built-in-pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ Pipeline Base Class
:members:
:member-order: bysource

.. _pipeline_check_vulnerabilities:

Check Vulnerabilities
---------------------
.. autoclass:: scanpipe.pipelines.check_vulnerabilities.CheckVulnerabilities()
:members:
:member-order: bysource

.. _pipeline_docker:

Docker Image Analysis
Expand All @@ -39,6 +31,14 @@ Docker Windows Image Analysis
:members:
:member-order: bysource

.. _pipeline_find_vulnerabilities:

Find Vulnerabilities
--------------------
.. autoclass:: scanpipe.pipelines.find_vulnerabilities.FindVulnerabilities()
:members:
:member-order: bysource

.. _pipeline_inspect_manifest:

Inspect Manifest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
from scanpipe.pipes import vulnerablecode


class CheckVulnerabilities(Pipeline):
class FindVulnerabilities(Pipeline):
"""
A pipeline to check for discovered packages vulnerabilities in the VulnerableCode
A pipeline to find vulnerabilities for discovered packages in the VulnerableCode
database.
Vulnerability data is stored in the extra_data field of each package.
Expand Down
4 changes: 2 additions & 2 deletions scanpipe/tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,10 @@ def test_scanpipe_load_inventory_pipeline_integration_test(self):
@mock.patch("scanpipe.pipes.vulnerablecode.is_available")
@mock.patch("scanpipe.pipes.vulnerablecode.is_configured")
@mock.patch("scanpipe.pipes.vulnerablecode.get_vulnerabilities_by_purl")
def test_scanpipe_check_vulnerabilities_pipeline_integration_test(
def test_scanpipe_find_vulnerabilities_pipeline_integration_test(
self, mock_get_vulnerabilities, mock_is_configured, mock_is_available
):
pipeline_name = "check_vulnerabilities"
pipeline_name = "find_vulnerabilities"
project1 = Project.objects.create(name="Analysis")
package1 = DiscoveredPackage.create_from_data(project1, package_data1)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ console_scripts =
scanpipe = scancodeio:command_line

scancodeio_pipelines =
check_vulnerabilities = scanpipe.pipelines.check_vulnerabilities:CheckVulnerabilities
find_vulnerabilities = scanpipe.pipelines.find_vulnerabilities:FindVulnerabilities
docker = scanpipe.pipelines.docker:Docker
docker_windows = scanpipe.pipelines.docker_windows:DockerWindows
inspect_manifest = scanpipe.pipelines.inspect_manifest:InspectManifest
Expand Down

0 comments on commit 6b069c3

Please sign in to comment.