mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 19:07:28 +00:00
modify owasp zap
This commit is contained in:
parent
2293c8095b
commit
fa3cb93ff5
1 changed files with 12 additions and 1 deletions
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
|
|
@ -157,10 +157,21 @@ pipeline {
|
|||
steps {
|
||||
echo 'Running OWASP ZAP Baseline Scan...'
|
||||
sh """
|
||||
set -e
|
||||
ZAP_IMAGE="owasp/zap2docker-stable"
|
||||
ZAP_FALLBACK_IMAGE="ghcr.io/zaproxy/zaproxy:stable"
|
||||
|
||||
echo "Pulling ZAP image: ${ZAP_IMAGE}"
|
||||
if ! docker pull "${ZAP_IMAGE}"; then
|
||||
echo "Primary pull failed, trying fallback: ${ZAP_FALLBACK_IMAGE}"
|
||||
docker pull "${ZAP_FALLBACK_IMAGE}"
|
||||
ZAP_IMAGE="${ZAP_FALLBACK_IMAGE}"
|
||||
fi
|
||||
|
||||
docker run --rm \
|
||||
--network=spring-petclinic_devops-net \
|
||||
-v \$(pwd):/zap/wrk \
|
||||
owasp/zap2docker-stable zap-baseline.py \
|
||||
"${ZAP_IMAGE}" zap-baseline.py \
|
||||
-t http://petclinic:8080 \
|
||||
-r zap_report.html \
|
||||
-I
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue