Skip to content

Add license scanning scanner classes

Oscar Tovar requested to merge create-license-scanning-classes into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds a set of classes that will hold the implementation for license scanning. To better define the responsibilities of implementing the artifact and sbom based scanning, three new classes have been created.

  • BaseScanner - this class acts as an interface that must be implemented by a license scanning scanner.
  • ArtifactScanner - this will hold the license scanning logic based on parsing the current license scanning report.
  • SbomScanner - this class will hold the license scanning logic based on joining the applications sbom components with the known licenses stored in the new software license database.

The classes are group under the ::Gitlab::LicenseScanning module which provides an API for creating the license scanning scanners (similar to a factory). At this time, the only method defined is ArtifactScanner#latest_pipeline which fetches the latest pipeline that contains a license scanning artifact for a given project+ref.

Issue: Extract License Scanning artifact scanner (#384934 - closed)

Background: #378407 (comment 1192652058)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Oscar Tovar

Merge request reports