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
if target_type == 'website'
variables.append(key: 'DAST_WEBSITE', value: url)
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)
end
......
......@@ -239,7 +239,7 @@ RSpec.describe DastSiteProfile, type: :model do
it 'returns a collection of variables with api configuration only', :aggregate_failures do
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)
end
end
......
......@@ -12,8 +12,6 @@ variables:
dast:
stage: dast
image: $DAST_API_IMAGE
variables:
GIT_STRATEGY: none
allow_failure: true
script:
- /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