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.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
index 1e5200e8682..79c1c14dc4e 100644
--- a/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
+++ b/lib/gitlab/ci/parsers/sbom/cyclonedx.rb
@@ -5,8 +5,6 @@ module Gitlab
module Parsers
module Sbom
class Cyclonedx
- SUPPORTED_SPEC_VERSIONS = %w[1.4].freeze
-
def parse!(blob, sbom_report)
@report = sbom_report
@data = Gitlab::Json.parse(blob)
@@ -27,18 +25,7 @@ module Gitlab
end
def valid?
- valid_schema? && supported_spec_version?
- end
-
- def supported_spec_version?
- return true if SUPPORTED_SPEC_VERSIONS.include?(data['specVersion'])
-
- report.add_error(
- "Unsupported CycloneDX spec version. Must be one of: %{versions}" \
- % { versions: SUPPORTED_SPEC_VERSIONS.join(', ') }
- )
-
- false
+ valid_schema?
end
def valid_schema?