Generate SBOM in SPDX format

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Today, Gitlab customers can generate Cyclone DX formatted SBOMs using our dependency and container scanning features. Many customers would prefer to generate these SBOMs in the SPDX format instead. This issue tracks the work required to generate SPDX SBOMs using Gitlab's dependency and container scanning features.

Resources

Proposal

  • Update Dependency and Container Scanning to return sboms in spdx format.
  • Update rails monolith to be able to parse spdx.

(Older) Draft Proposals

Proposal 1

Update GitLab report ingestion to add the spdx sbom format. The main piece of work that will need to be completed would be to add a parser for spdx reports. See lib/gitlab/ci/parsers.rb and lib/gitlab/ci/parsers/sbom/cyclonedx.rb.

Note: some other pieces (like supporting the artifact type) would be required and could be found by searching for cyclonedx in the code base.

Pros:

  • code lives in rails monolith - update cadence and features under our control
  • extensible

Cons:

  • expensive
  • longer to complete

Proposal 2

Use a converter (e.g. https://github.com/CycloneDX/cyclonedx-cli) to convert spdx reports into cyclonedx that is parseable by the rails monolith. However, it remains to be verified whether a conversion is possible without data loss (for the purposes of dependency and container scanning).

Pros:

  • fast to implement
  • can be done even now by users

Cons:

  • not using an extensible implementation
  • changes/updates require 3rd party library approval

Intended users

Implementation plan

The plan can be divided into 2 discrete portions: spdx sbom generation and spdx sbom parsing.

  1. Spdx sbom generation
    • Dependency Scanning analyzer.
      • Update sbomgen to take an optional argument which specifies format (e.g. SBOM_FORMAT) and utilizes the above functionality when the argument is spdx.
      • Implement an spdx generator using sbom.go and convert.go as a guide.
      • Refactor sbom generation functionality to create an sbom, cyclonedx, and spdx packages.
      • Note: An sbom for a monolithic codebase for multiple projects is currently represented by several concatenated sboms.
    • Container Scanning analyzer.
  2. Spdx sbom parsing

Auto-Summary 🤖

Discoto Usage

Points

Discussion points are declared by headings, list items, and single lines that start with the text (case-insensitive) point:. For example, the following are all valid points:

  • #### POINT: This is a point
  • * point: This is a point
  • + Point: This is a point
  • - pOINT: This is a point
  • point: This is a **point**

Note that any markdown used in the point text will also be propagated into the topic summaries.

Topics

Topics can be stand-alone and contained within an issuable (epic, issue, MR), or can be inline.

Inline topics are defined by creating a new thread (discussion) where the first line of the first comment is a heading that starts with (case-insensitive) topic:. For example, the following are all valid topics:

  • # Topic: Inline discussion topic 1
  • ## TOPIC: **{+A Green, bolded topic+}**
  • ### tOpIc: Another topic

Quick Actions

Action Description
/discuss sub-topic TITLE Create an issue for a sub-topic. Does not work in epics
/discuss link ISSUABLE-LINK Link an issuable as a child of this discussion

Last updated by this job

Discoto Settings
---
summary:
  max_items: -1
  sort_by: created
  sort_direction: ascending

See the settings schema for details.

Edited by 🤖 GitLab Bot 🤖