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>2021-06-16 21:25:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 21:25:58 +0300
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /app/services/security
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/services/security')
-rw-r--r--app/services/security/ci_configuration/sast_parser_service.rb20
1 files changed, 6 insertions, 14 deletions
diff --git a/app/services/security/ci_configuration/sast_parser_service.rb b/app/services/security/ci_configuration/sast_parser_service.rb
index 5220525d552..cae9a90f0a0 100644
--- a/app/services/security/ci_configuration/sast_parser_service.rb
+++ b/app/services/security/ci_configuration/sast_parser_service.rb
@@ -74,19 +74,11 @@ module Security
def sast_excluded_analyzers
strong_memoize(:sast_excluded_analyzers) do
- all_analyzers = Security::CiConfiguration::SastBuildAction::SAST_DEFAULT_ANALYZERS.split(', ') rescue []
- enabled_analyzers = sast_default_analyzers.split(',').map(&:strip) rescue []
-
excluded_analyzers = gitlab_ci_yml_attributes["SAST_EXCLUDED_ANALYZERS"] || sast_template_attributes["SAST_EXCLUDED_ANALYZERS"]
- excluded_analyzers = excluded_analyzers.split(',').map(&:strip) rescue []
- ((all_analyzers - enabled_analyzers) + excluded_analyzers).uniq
+ excluded_analyzers.split(',').map(&:strip) rescue []
end
end
- def sast_default_analyzers
- @sast_default_analyzers ||= gitlab_ci_yml_attributes["SAST_DEFAULT_ANALYZERS"] || sast_template_attributes["SAST_DEFAULT_ANALYZERS"]
- end
-
def sast_template_attributes
@sast_template_attributes ||= build_sast_attributes(sast_template_content)
end
@@ -109,17 +101,17 @@ module Security
yaml_result = Gitlab::Ci::YamlProcessor.new(content, options).execute
return {} unless yaml_result.valid?
- sast_attributes = yaml_result.build_attributes(:sast)
- extract_required_attributes(sast_attributes)
+ extract_required_attributes(yaml_result)
end
- def extract_required_attributes(attributes)
+ def extract_required_attributes(yaml_result)
result = {}
- attributes[:yaml_variables].each do |variable|
+
+ yaml_result.yaml_variables_for(:sast).each do |variable|
result[variable[:key]] = variable[:value]
end
- result[:stage] = attributes[:stage]
+ result[:stage] = yaml_result.stage_for(:sast)
result.with_indifferent_access
end
end