Skip to content

Commit 84dd56d

Browse files
Reet00J12934
authored andcommitted
Fix cascading-rules for zap-automation-framework
The provided parameters were the same as for the zap-advanced and therefore not compatible with the zap-automation-framework. Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
1 parent cb97278 commit 84dd56d

3 files changed

Lines changed: 54 additions & 6 deletions

File tree

scanners/zap-automation-framework/cascading-rules/http.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,17 @@ spec:
2222
state: open
2323
scanSpec:
2424
scanType: "zap-automation-framework"
25-
parameters: ["-t", "http://{{$.hostOrIP}}:{{attributes.port}}"]
25+
parameters:
26+
- "-autorun"
27+
- "/home/securecodebox/scb-automation/automation.yaml"
28+
volumeMounts:
29+
- name: zap-automation-framework-baseline-config
30+
mountPath: /home/securecodebox/scb-automation/automation.yaml
31+
subPath: automation.yaml
32+
volumes:
33+
- name: zap-automation-framework-baseline-config
34+
configMap:
35+
name: zap-automation-framework-baseline-config
36+
env:
37+
- name: TARGET_URL
38+
value: "http://{{$.hostOrIP}}:{{attributes.port}}"

scanners/zap-automation-framework/cascading-rules/https.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,17 @@ spec:
1818
state: open
1919
scanSpec:
2020
scanType: "zap-automation-framework"
21-
parameters: ["-t", "https://{{$.hostOrIP}}:{{attributes.port}}"]
21+
parameters:
22+
- "-autorun"
23+
- "/home/securecodebox/scb-automation/automation.yaml"
24+
volumeMounts:
25+
- name: zap-automation-framework-baseline-config
26+
mountPath: /home/securecodebox/scb-automation/automation.yaml
27+
subPath: automation.yaml
28+
volumes:
29+
- name: zap-automation-framework-baseline-config
30+
configMap:
31+
name: zap-automation-framework-baseline-config
32+
env:
33+
- name: TARGET_URL
34+
value: "https://{{$.hostOrIP}}:{{attributes.port}}"

scanners/zap-automation-framework/tests/__snapshot__/scanner_test.yaml.snap

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,21 @@ matches the snapshot:
4848
state: open
4949
category: Open Port
5050
scanSpec:
51+
env:
52+
- name: TARGET_URL
53+
value: http://{{$.hostOrIP}}:{{attributes.port}}
5154
parameters:
52-
- -t
53-
- http://{{$.hostOrIP}}:{{attributes.port}}
55+
- -autorun
56+
- /home/securecodebox/scb-automation/automation.yaml
5457
scanType: zap-automation-framework
58+
volumeMounts:
59+
- mountPath: /home/securecodebox/scb-automation/automation.yaml
60+
name: zap-automation-framework-baseline-config
61+
subPath: automation.yaml
62+
volumes:
63+
- configMap:
64+
name: zap-automation-framework-baseline-config
65+
name: zap-automation-framework-baseline-config
5566
3: |
5667
apiVersion: cascading.securecodebox.io/v1
5768
kind: CascadingRule
@@ -68,10 +79,21 @@ matches the snapshot:
6879
state: open
6980
category: Open Port
7081
scanSpec:
82+
env:
83+
- name: TARGET_URL
84+
value: https://{{$.hostOrIP}}:{{attributes.port}}
7185
parameters:
72-
- -t
73-
- https://{{$.hostOrIP}}:{{attributes.port}}
86+
- -autorun
87+
- /home/securecodebox/scb-automation/automation.yaml
7488
scanType: zap-automation-framework
89+
volumeMounts:
90+
- mountPath: /home/securecodebox/scb-automation/automation.yaml
91+
name: zap-automation-framework-baseline-config
92+
subPath: automation.yaml
93+
volumes:
94+
- configMap:
95+
name: zap-automation-framework-baseline-config
96+
name: zap-automation-framework-baseline-config
7597
4: |
7698
apiVersion: v1
7799
data:

0 commit comments

Comments
 (0)