Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c9bb2be8
Commit
c9bb2be8
authored
Nov 19, 2020
by
Craig Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate on-demand scan template from DAST template
parent
d607ea70
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
17 deletions
+32
-17
ee/app/services/ci/run_dast_scan_service.rb
ee/app/services/ci/run_dast_scan_service.rb
+3
-6
ee/changelogs/unreleased/dast_ondemand_scan_template_284983.yml
...ngelogs/unreleased/dast_ondemand_scan_template_284983.yml
+5
-0
ee/spec/services/ci/run_dast_scan_service_spec.rb
ee/spec/services/ci/run_dast_scan_service_spec.rb
+0
-11
lib/gitlab/ci/templates/Security/DAST-On-Demand-Scan.gitlab-ci.yml
...b/ci/templates/Security/DAST-On-Demand-Scan.gitlab-ci.yml
+24
-0
No files found.
ee/app/services/ci/run_dast_scan_service.rb
View file @
c9bb2be8
...
...
@@ -17,13 +17,10 @@ module Ci
def
self
.
ci_template_raw
<<~
YAML
include:
- template: DAST.gitlab-ci.yml
stages:
- dast
dast:
rules:
- when: always
- dast
include:
- template: DAST-On-Demand-Scan.gitlab-ci.yml
YAML
end
...
...
ee/changelogs/unreleased/dast_ondemand_scan_template_284983.yml
0 → 100644
View file @
c9bb2be8
---
title
:
Separate on-demand scan template from DAST template
merge_request
:
48088
author
:
type
:
changed
ee/spec/services/ci/run_dast_scan_service_spec.rb
View file @
c9bb2be8
...
...
@@ -23,15 +23,6 @@ RSpec.describe Ci::RunDastScanService do
it
'has only one stage'
do
expect
(
described_class
.
ci_template
[
'stages'
]).
to
eq
([
'dast'
])
end
it
'has one rule is always true'
do
rules
=
described_class
.
ci_template
[
'dast'
][
'rules'
]
aggregate_failures
do
expect
(
rules
.
size
).
to
eq
(
1
)
expect
(
rules
).
to
include
(
'when'
=>
'always'
)
end
end
end
describe
'#execute'
do
...
...
@@ -96,8 +87,6 @@ RSpec.describe Ci::RunDastScanService do
'name'
=>
'$SECURE_ANALYZERS_PREFIX/dast:$DAST_VERSION'
},
'script'
=>
[
'export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}'
,
'if [ -z "$DAST_WEBSITE$DAST_API_SPECIFICATION" ]; then echo "Either DAST_WEBSITE or DAST_API_SPECIFICATION must be set. See https://docs.gitlab.com/ee/user/application_security/dast/#configuration for more details." && exit 1; fi'
,
'/analyze'
],
'artifacts'
=>
{
...
...
lib/gitlab/ci/templates/Security/DAST-On-Demand-Scan.gitlab-ci.yml
0 → 100644
View file @
c9bb2be8
stages
:
-
build
-
test
-
deploy
-
dast
variables
:
DAST_VERSION
:
1
# Setting this variable will affect all Security templates
# (SAST, Dependency Scanning, ...)
SECURE_ANALYZERS_PREFIX
:
"
registry.gitlab.com/gitlab-org/security-products/analyzers"
dast
:
stage
:
dast
image
:
name
:
"
$SECURE_ANALYZERS_PREFIX/dast:$DAST_VERSION"
variables
:
GIT_STRATEGY
:
none
allow_failure
:
true
script
:
-
/analyze
artifacts
:
reports
:
dast
:
gl-dast-report.json
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment