Skip to content

Implement License Scanning SBOM scanner

Dependent MRs

  1. Implement License Scanning SBOM scanner (!109447 - merged) - 👈 You are here

    This MR only tests when the license_scanning_sbom_scanner feature flag is set to false, because in order to test when it's set to true, we need some of the code added by the dependent MR 2. below. See this comment for more details.

  2. Fetch latest license scanning build from `Licen... (!109723 - merged)

    This MR tests when license_scanning_sbom_scanner is set to true.

These MRs are constructed so that they can be reviewed individually, but all the changes will be merged in the final MR. See !109447 (comment 1255025150) for more context.

What does this MR do and why?

This MR implements the following methods:

  1. #report

    1. Fetch project dependencies for the given project or pipeline using SBOM component fetchers.
    2. Normalize component names, unless the SBOM component fetchers already do it. See #384932 (comment 1230139272)
    3. Get the licenses of package versions using another fetcher.
    4. Build and return a Ci::Reports::LicenseScanning::Report.
  2. #has_data?

    returns true if the pipeline has SBOM reports.

  3. #data_available?

    returns true if the pipeline is complete and has SBOM reports.

It also adds a new license_scanning_sbom_scanner Feature Flag. When enabled, license scanning will retrieve the components from the SBOM files, and find licenses related to the components.

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.

Related to #384932 (closed)

Edited by Adam Cohen

Merge request reports