Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 7733e0d

Browse files
committed
Fix Zap ScanTemplate
1 parent 09f8a2a commit 7733e0d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

integrations/zap/zap-scanjob-definitions.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ spec:
1111
ttlSecondsAfterFinished: 10
1212
template:
1313
spec:
14-
restartPolicy: OnFailure
14+
restartPolicy: Never
1515
containers:
1616
- name: zap-baseline
17-
image: owasp/zap2docker-bare:2.9.0
17+
image: owasp/zap2docker-stable:2.9.0
1818
command:
1919
- 'zap-baseline.py'
20+
# Force Zap to always return a zero exit code. k8s would otherwise try to restart zap.
21+
- '-I'
2022
- '-J'
2123
# ZAP Baseline Script doesn't allow absolute paths...
2224
# Hacky workaround: specify a relative path to the `/zap/wrk` base dir.
@@ -41,12 +43,14 @@ spec:
4143
ttlSecondsAfterFinished: 10
4244
template:
4345
spec:
44-
restartPolicy: OnFailure
46+
restartPolicy: Never
4547
containers:
4648
- name: zap-api-scan
47-
image: owasp/zap2docker-bare:2.9.0
49+
image: owasp/zap2docker-stable:2.9.0
4850
command:
4951
- 'zap-api-scan.py'
52+
# Force Zap to always return a zero exit code. k8s would otherwise try to restart zap.
53+
- '-I'
5054
- '-J'
5155
# ZAP Baseline Script doesn't allow absolute paths...
5256
# Hacky workaround: specify a relative path to the `/zap/wrk` base dir.
@@ -71,12 +75,14 @@ spec:
7175
ttlSecondsAfterFinished: 10
7276
template:
7377
spec:
74-
restartPolicy: OnFailure
78+
restartPolicy: Never
7579
containers:
7680
- name: zap-full-scan
77-
image: owasp/zap2docker-bare:2.9.0
81+
image: owasp/zap2docker-stable:2.9.0
7882
command:
7983
- 'zap-full-scan.py'
84+
# Force Zap to always return a zero exit code. k8s would otherwise try to restart zap.
85+
- '-I'
8086
- '-J'
8187
# ZAP Baseline Script doesn't allow absolute paths...
8288
# Hacky workaround: specify a relative path to the `/zap/wrk` base dir.

0 commit comments

Comments
 (0)