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/reports/sbom/report.rb')
-rw-r--r--lib/gitlab/ci/reports/sbom/report.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/gitlab/ci/reports/sbom/report.rb b/lib/gitlab/ci/reports/sbom/report.rb
new file mode 100644
index 00000000000..dc6b3153e51
--- /dev/null
+++ b/lib/gitlab/ci/reports/sbom/report.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Ci
+ module Reports
+ module Sbom
+ class Report
+ attr_reader :components, :source, :errors
+
+ def initialize
+ @components = []
+ @errors = []
+ end
+
+ def add_error(error)
+ errors << error
+ end
+
+ def set_source(source)
+ self.source = Source.new(source)
+ end
+
+ def add_component(component)
+ components << Component.new(component)
+ end
+
+ private
+
+ attr_writer :source
+ end
+ end
+ end
+ end
+end