Commit 5b13c393 authored by Matija Čupić's avatar Matija Čupić

Merge branch '324734-defaults-to-script-dastapi' into 'master'

Move defaults into script for DAST API

See merge request gitlab-org/gitlab!60064
parents 2fc93a86 26a4edb5
---
title: Move defaults into script for DAST API
merge_request: 60064
author:
type: changed
......@@ -23,17 +23,7 @@ variables:
# (SAST, Dependency Scanning, ...)
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
#
DAST_API_PROFILE: Full
DAST_API_VERSION: "1"
DAST_API_CONFIG: .gitlab-dast-api.yml
DAST_API_TIMEOUT: 30
DAST_API_REPORT: gl-dast-api-report.json
DAST_API_REPORT_ASSET_PATH: assets
#
# Wait up to 5 minutes for API Security and target url to become
# available (non 500 response to HTTP(s))
DAST_API_SERVICE_START_TIMEOUT: "300"
#
DAST_API_IMAGE: registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing:${DAST_API_VERSION}-engine
dast:
......@@ -76,16 +66,7 @@ dast:
dast_api:
stage: dast
image:
name: $DAST_API_IMAGE
entrypoint: ["/bin/bash", "-l", "-c"]
variables:
API_SECURITY_MODE: DAST
DAST_API_NEW_REPORT: 1
DAST_API_PROJECT: $CI_PROJECT_PATH
DAST_API_API: http://127.0.0.1:5000
DAST_API_LOG_SCANNER: gl-dast-api-scanner.log
TZ: America/Los_Angeles
image: $DAST_API_IMAGE
allow_failure: true
rules:
- if: $DAST_API_BETA == null
......@@ -110,33 +91,12 @@ dast_api:
- if: $CI_COMMIT_BRANCH &&
$GITLAB_FEATURES =~ /\bdast\b/
script:
#
# Run user provided pre-script
- sh -c "$DAST_API_PRE_SCRIPT"
#
# Make sure asset path exists
- mkdir -p $DAST_API_REPORT_ASSET_PATH
#
# Start API Security background process
- dotnet /peach/Peach.Web.dll &> $DAST_API_LOG_SCANNER &
- APISEC_PID=$!
#
# Start scanning
- worker-entry
#
# Run user provided post-script
- sh -c "$DAST_API_POST_SCRIPT"
#
# Shutdown API Security
- kill $APISEC_PID
- wait $APISEC_PID
#
- /peach/analyzer-dast-api
artifacts:
when: always
paths:
- $DAST_API_REPORT_ASSET_PATH
- $DAST_API_REPORT
- $DAST_API_LOG_SCANNER
- gl-assets
- gl-dast-api-report.json
- gl-*.log
reports:
dast: $DAST_API_REPORT
dast: gl-dast-api-report.json
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