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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-03 18:11:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-03 18:11:10 +0300
commit849c67f6da8d997d9fa54bba3526c64c7678aae6 (patch)
tree8236ab0e5f4151afe7052b4a0559f5d27c89928d /lib/gitlab/ci/parsers
parent91035102b4e313787a45217ff12bb88f7f48bf20 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/parsers')
-rw-r--r--lib/gitlab/ci/parsers/security/validators/schema_validator.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
index ee7733a081d..3a6b9ccdc33 100644
--- a/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
+++ b/lib/gitlab/ci/parsers/security/validators/schema_validator.rb
@@ -93,11 +93,7 @@ module Gitlab
log_warnings(problem_type: 'schema_validation_fails') unless schema_validation_errors.empty?
- if Feature.enabled?(:enforce_security_report_validation, @project)
- @errors += schema_validation_errors
- else
- @warnings += schema_validation_errors
- end
+ @errors += schema_validation_errors
end
def populate_warnings
@@ -130,11 +126,7 @@ module Gitlab
def add_unsupported_report_version_message
log_warnings(problem_type: 'using_unsupported_schema_version')
- if Feature.enabled?(:enforce_security_report_validation, @project)
- handle_unsupported_report_version(treat_as: :error)
- else
- handle_unsupported_report_version(treat_as: :warning)
- end
+ handle_unsupported_report_version
end
def report_uses_deprecated_schema_version?
@@ -145,14 +137,14 @@ module Gitlab
SUPPORTED_VERSIONS[report_type].include?(report_version)
end
- def handle_unsupported_report_version(treat_as:)
+ def handle_unsupported_report_version
if report_version.nil?
message = "Report version not provided, #{report_type} report type supports versions: #{supported_schema_versions}"
else
message = "Version #{report_version} for report type #{report_type} is unsupported, supported versions for this report type are: #{supported_schema_versions}"
end
- add_message_as(level: treat_as, message: message)
+ add_message_as(level: :error, message: message)
end
def supported_schema_versions