Skip to content

Commit d68b75b

Browse files
committed
#2940 Update helm unit tests for zap-automation-framework
Signed-off-by: Samreet Singh <samreet.singh@iteratec.com>
1 parent bd0a7e3 commit d68b75b

1 file changed

Lines changed: 33 additions & 4 deletions

File tree

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
matches the snapshot:
22
1: |
3+
apiVersion: v1
4+
data:
5+
automation.yaml: |-
6+
env: # The environment, mandatory
7+
contexts : # List of 1 or more contexts, mandatory
8+
- name: baseline-config # Name to be used to refer to this context in other jobs, mandatory
9+
urls: ["${TARGET_URL}"] # A mandatory list of top level urls, everything under each url will be included
10+
jobs:
11+
- type: spider # The traditional spider - fast but doesnt handle modern apps so well
12+
parameters:
13+
context: baseline-config # String: Name of the context to spider, default: first context
14+
maxDuration: 1 # Int: The max time in minutes the spider will be allowed to run for, default: 0 unlimited
15+
- type: passiveScan-wait # Passive scan wait for the passive scanner to finish
16+
parameters:
17+
maxDuration: 5 # Int: The max time to wait for the passive scanner, default: 0 unlimited
18+
- type: activeScan # The active scanner - this actively attacks the target so should only be used with permission
19+
parameters:
20+
context: baseline-config # String: Name of the context to attack, default: first context
21+
maxRuleDurationInMins: 3 # Int: The max time in minutes any individual rule will be allowed to run for, default: 0 unlimited
22+
maxScanDurationInMins: 10 # Int: The max time in minutes the active scanner will be allowed to run for, default: 0 unlimited
23+
- type: report # Report generation
24+
parameters:
25+
template: traditional-xml # String: The template id, default : modern
26+
reportDir: /home/securecodebox/ # String: The directory into which the report will be written
27+
reportFile: zap-results # String: The report file name pattern
28+
kind: ConfigMap
29+
metadata:
30+
name: zap-automation-framework-baseline-config
31+
2: |
332
apiVersion: cascading.securecodebox.io/v1
433
kind: CascadingRule
534
metadata:
@@ -23,7 +52,7 @@ matches the snapshot:
2352
- -t
2453
- http://{{$.hostOrIP}}:{{attributes.port}}
2554
scanType: zap-automation-framework
26-
2: |
55+
3: |
2756
apiVersion: cascading.securecodebox.io/v1
2857
kind: CascadingRule
2958
metadata:
@@ -43,7 +72,7 @@ matches the snapshot:
4372
- -t
4473
- https://{{$.hostOrIP}}:{{attributes.port}}
4574
scanType: zap-automation-framework
46-
3: |
75+
4: |
4776
apiVersion: v1
4877
data:
4978
zap-entrypoint.bash: |2
@@ -52,7 +81,7 @@ matches the snapshot:
5281
kind: ConfigMap
5382
metadata:
5483
name: zap-automation-framework-entrypoint
55-
4: |
84+
5: |
5685
apiVersion: execution.securecodebox.io/v1
5786
kind: ParseDefinition
5887
metadata:
@@ -72,7 +101,7 @@ matches the snapshot:
72101
tolerations:
73102
- foo: bar
74103
ttlSecondsAfterFinished: null
75-
5: |
104+
6: |
76105
apiVersion: execution.securecodebox.io/v1
77106
kind: ScanType
78107
metadata:

0 commit comments

Comments
 (0)