summaryrefslogtreecommitdiff
path: root/app/services/security/ci_configuration/sast_create_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/security/ci_configuration/sast_create_service.rb')
-rw-r--r--app/services/security/ci_configuration/sast_create_service.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/services/security/ci_configuration/sast_create_service.rb b/app/services/security/ci_configuration/sast_create_service.rb
index d78e22f1fe1..643cb7f89dc 100644
--- a/app/services/security/ci_configuration/sast_create_service.rb
+++ b/app/services/security/ci_configuration/sast_create_service.rb
@@ -20,13 +20,7 @@ module Security
end
def action
- existing_content = begin
- existing_gitlab_ci_content # this can fail on the very first commit
- rescue StandardError
- nil
- end
-
- Security::CiConfiguration::SastBuildAction.new(project.auto_devops_enabled?, params, existing_content, project.ci_config_path).generate
+ Security::CiConfiguration::SastBuildAction.new(project.auto_devops_enabled?, params, existing_gitlab_ci_content, project.ci_config_path).generate
end
def next_branch
@@ -40,6 +34,10 @@ module Security
def description
_('Configure SAST in `.gitlab-ci.yml` using the GitLab managed template. You can [add variable overrides](https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings) to customize SAST settings.')
end
+
+ def name
+ 'SAST'
+ end
end
end
end