Skip to content

Add props field to SBOM component parser

Aditya Tiwari requested to merge 433084-add-prop-to-comp into master

What does this MR do and why?

Add props field to SBOM component parser

Add props field to SBOM component CI parser class

Changelog: added

Screenshots or screen recordings

Screenshot_2023-12-18_at_1.45.50_PM

How to set up and validate locally

Use the following code

You can use following sample sbom file generated in https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/ project pipeline.

gl-sbom-report.cdx.json


file = File.read 'gl-sbom-report.cdx.json'
data_hash = JSON.parse(file)
raw_report_data = data_hash.to_json
report = Gitlab::Ci::Reports::Sbom::Report.new
raw_report_data
r = Gitlab::Ci::Parsers::Sbom::Cyclonedx.new.parse!(raw_report_data, report)
report
report.components

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 #433084 (closed)

Edited by Aditya Tiwari

Merge request reports

Loading