Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/parsers/sbom/cyclonedx.rb')
-rw-r--r--lib/gitlab/ci/parsers/sbom/cyclonedx.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
index bc62fbe55ec..1e5200e8682 100644
--- a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
+++ b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
@@ -58,6 +58,15 @@ module Gitlab
properties = data.dig('metadata', 'properties')
source = CyclonedxProperties.parse_source(properties)
report.set_source(source) if source
+
+ tools = data.dig('metadata', 'tools')
+ authors = data.dig('metadata', 'authors')
+
+ report.metadata = ::Gitlab::Ci::Reports::Sbom::Metadata.new.tap do |metadata|
+ metadata.tools = tools if tools
+ metadata.authors = authors if authors
+ metadata.properties = properties if properties
+ end
end
def parse_components