Skip to content

Split cyclonedx artifact into multiple reports

What does this MR do and why?

Different from SBOM ingestion, CVS on SBOM changes, and license scanning, the security report builder fetches the CycloneDX artifact into a single SBOM report. As a result, all components are bundled into one report containing a single metadata section.

This MR splits the cyclonedx artifact into multiple sbom reports, ensuring that components are kept within their respective set of metadata and source information.

This issue occurs only when multiple cyclonedx artifacts with different purl types are present within a single job.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After
Screenshot_2025-02-25_at_18.43.51 Screenshot_2025-02-25_at_18.43.51

How to set up and validate locally

  1. Create a project with the following files:

gl-sbom-gem-bundler.cdx.json

gl-sbom-npm-yarn.cdx.json

gl-sbom-pypi-pipenv.cdx.json

.gitlab-ci.yml:

cyclonedx-reports:
  script:
    - echo "test"
  artifacts:
    access: 'developer'
    paths:
      - "**/gl-sbom-*.cdx.json"
    reports:
      cyclonedx: "**/gl-sbom-*.cdx.json"
  1. Run a new pipeline and the each security finding should be based to its respective metadata
Edited by Zamir Martins

Merge request reports

Loading