Commit 63eab949 authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch 'mc_rocha-fix-dast-api-on-demand-template-347255' into 'master'

Fix DAST On-Demand API Scan template

See merge request gitlab-org/gitlab!76491
parents aa948df1 078dfed9
...@@ -44,7 +44,7 @@ class DastSiteProfile < ApplicationRecord ...@@ -44,7 +44,7 @@ class DastSiteProfile < ApplicationRecord
if target_type == 'website' if target_type == 'website'
variables.append(key: 'DAST_WEBSITE', value: url) variables.append(key: 'DAST_WEBSITE', value: url)
else else
variables.append(key: 'DAST_API_SPECIFICATION', value: url) variables.append(key: 'DAST_API_OPENAPI', value: url)
variables.append(key: 'DAST_API_HOST_OVERRIDE', value: URI(url).host) variables.append(key: 'DAST_API_HOST_OVERRIDE', value: URI(url).host)
end end
......
...@@ -239,7 +239,7 @@ RSpec.describe DastSiteProfile, type: :model do ...@@ -239,7 +239,7 @@ RSpec.describe DastSiteProfile, type: :model do
it 'returns a collection of variables with api configuration only', :aggregate_failures do it 'returns a collection of variables with api configuration only', :aggregate_failures do
expect(keys).not_to include('DAST_WEBSITE') expect(keys).not_to include('DAST_WEBSITE')
expect(collection).to include(key: 'DAST_API_SPECIFICATION', value: subject.dast_site.url, public: true) expect(collection).to include(key: 'DAST_API_OPENAPI', value: subject.dast_site.url, public: true)
expect(collection).to include(key: 'DAST_API_HOST_OVERRIDE', value: URI(subject.dast_site.url).host, public: true) expect(collection).to include(key: 'DAST_API_HOST_OVERRIDE', value: URI(subject.dast_site.url).host, public: true)
end end
end end
......
...@@ -12,8 +12,6 @@ variables: ...@@ -12,8 +12,6 @@ variables:
dast: dast:
stage: dast stage: dast
image: $DAST_API_IMAGE image: $DAST_API_IMAGE
variables:
GIT_STRATEGY: none
allow_failure: true allow_failure: true
script: script:
- /peach/analyzer-dast-api - /peach/analyzer-dast-api
......
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