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
9b19f701
Commit
9b19f701
authored
Dec 01, 2020
by
Seth Berger
Committed by
Russell Dickenson
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added environment_url.txt example
parent
e733d1f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
doc/user/application_security/dast/index.md
doc/user/application_security/dast/index.md
+16
-6
No files found.
doc/user/application_security/dast/index.md
View file @
9b19f701
...
...
@@ -91,12 +91,22 @@ There are two ways to define the URL to be scanned by DAST:
1.
Set the
`DAST_WEBSITE`
[
variable
](
../../../ci/yaml/README.md#variables
)
.
1.
Add it in an
`environment_url.txt`
file at the root of your project.
This is great for testing in dynamic environments. In order to run DAST against
an app dynamically created during a GitLab CI/CD pipeline, have the app
persist its domain in an
`environment_url.txt`
file, and DAST
automatically parses that file to find its scan target.
You can see an
[
example
](
https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
)
of this in our Auto DevOps CI YAML.
This is useful for testing in dynamic environments. To run DAST against an application
dynamically created during a GitLab CI/CD pipeline, a job that runs prior to the DAST scan must
persist the application's domain in an
`environment_url.txt`
file. DAST automatically parses the
`environment_url.txt`
file to find its scan target.
For example, in a job that runs prior to DAST, you could include code that looks similar to:
```
yaml
script
:
-
echo http://${CI_PROJECT_ID}-${CI_ENVIRONMENT_SLUG}.domain.com > environment_url.txt
artifacts
:
paths
:
[
environment_url.txt
]
when
:
always
```
You can see an example of this in our
[
Auto DevOps CI YAML
](
https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
)
file.
If both values are set, the
`DAST_WEBSITE`
value takes precedence.
...
...
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