diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-13 09:08:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-13 09:08:35 +0300 |
commit | bddd19ac338778e1da512aa7392b96b652e2d72a (patch) | |
tree | 237352642e4b2b53dccd2f6b5beb62c34d8bb249 /lib/gitlab/ci/parsers | |
parent | 72de17cbd515c10f7425f19047f2508aa1dcee1b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/parsers')
-rw-r--r-- | lib/gitlab/ci/parsers/security/common.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/parsers/security/validators/schema_validator.rb | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/gitlab/ci/parsers/security/common.rb b/lib/gitlab/ci/parsers/security/common.rb index 1bc9bd719f9..13a159f3745 100644 --- a/lib/gitlab/ci/parsers/security/common.rb +++ b/lib/gitlab/ci/parsers/security/common.rb @@ -72,7 +72,13 @@ module Gitlab end def schema_validator - @schema_validator ||= ::Gitlab::Ci::Parsers::Security::Validators::SchemaValidator.new(report.type, report_data, report.version, project: @project) + @schema_validator ||= ::Gitlab::Ci::Parsers::Security::Validators::SchemaValidator.new( + report.type, + report_data, + report.version, + project: @project, + scanner: top_level_scanner + ) end def report_data diff --git a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb index 2474ba298f8..cef029bd749 100644 --- a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb +++ b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb @@ -86,11 +86,12 @@ module Gitlab end end - def initialize(report_type, report_data, report_version = nil, project: nil) + def initialize(report_type, report_data, report_version = nil, project: nil, scanner: nil) @report_type = report_type&.to_sym @report_data = report_data @report_version = report_version @project = project + @scanner = scanner @errors = [] @warnings = [] @deprecation_warnings = [] @@ -137,7 +138,9 @@ module Gitlab security_report_type: report_type, security_report_version: report_version, project_id: @project.id, - security_report_failure: problem_type + security_report_failure: problem_type, + security_report_scanner_id: @scanner&.dig('id'), + security_report_scanner_version: @scanner&.dig('version') ) end |