diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-12 21:11:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-12 21:11:09 +0300 |
commit | 60eaf3d90650086dedb6fd94d6169dc5ab1f8d1e (patch) | |
tree | ff943955f1c424787ba65ff7c1607c522c103115 /lib/gitlab/ci/parsers | |
parent | 1c8734ca5c2981e62b9c1162851ed136de86bbbf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/parsers')
-rw-r--r-- | lib/gitlab/ci/parsers/sbom/cyclonedx.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb index 0e2ca97b9cc..deb20a2138c 100644 --- a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb +++ b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb @@ -8,13 +8,9 @@ module Gitlab SUPPORTED_SPEC_VERSIONS = %w[1.4].freeze COMPONENT_ATTRIBUTES = %w[type name version].freeze - def initialize(json_data, report) - @json_data = json_data - @report = report - end - - def parse! - @data = Gitlab::Json.parse(json_data) + def parse!(blob, sbom_report) + @report = sbom_report + @data = Gitlab::Json.parse(blob) return unless valid? |