Commit ca7ad14a authored by Philip Cunningham's avatar Philip Cunningham

Fix Errno::ENOENT issue in RunDastScanService

parent c20df30d
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
module Ci module Ci
class RunDastScanService < BaseService class RunDastScanService < BaseService
DAST_CI_TEMPLATE = 'lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml'.freeze def self.ci_template_raw
@ci_template_raw ||= Gitlab::Template::GitlabCiYmlTemplate.find('DAST').content
end
def self.ci_template def self.ci_template
@ci_template ||= File.open(DAST_CI_TEMPLATE, 'r') { |f| YAML.safe_load(f.read) }.tap do |template| @ci_template ||= YAML.safe_load(ci_template_raw).tap do |template|
template['stages'] = ['dast'] template['stages'] = ['dast']
template['dast'].delete('rules') template['dast'].delete('rules')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment