Commit 078dfed9 authored by Marcos Rocha's avatar Marcos Rocha Committed by Luke Duncalfe

Update DAST On-Demand API Scan template

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76491

* replaces the DastSiteProfile ci variable from `DAST_API_SPECIFICATION` 
  to `DAST_API_OPENAPI` as suggested here
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73564#note_738732568
* remove the `GIT_STRATEGY: none` as suggested here
  https://gitlab.com/gitlab-org/gitlab/-/issues/347255#note_754003722
parent 1251eafe
...@@ -42,7 +42,7 @@ class DastSiteProfile < ApplicationRecord ...@@ -42,7 +42,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