File tree Expand file tree Collapse file tree
tests/integration/scanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import logging
44import sys
55import time
6+ import errno
67
78from pathlib import Path
89from zapv2 import ZAPv2
Original file line number Diff line number Diff line change 6767 - " api.disablekey=true" # Disble API Key. TODO: change with helm random value? -config api.key=change-me-9203935709
6868 ports :
6969 - containerPort : 8080
70- dnsPolicy : Default
7170 volumes :
7271 {{- toYaml .Values.scannerJob.extraVolumes | nindent 12 }}
Original file line number Diff line number Diff line change 3131 } ,
3232 6 * 60 * 1000
3333) ;
34+
35+ test (
36+ "ZAP-extended scan without config YAML against bodgeit container should only find couple findings" ,
37+ async ( ) => {
38+ const { categories, severities } = await scan (
39+ "zap-extended-scan-bodgeit-demo" ,
40+ "zap-extended-scan" ,
41+ [ "-t" , "http://bodgeit.default.svc:8080/bodgeit/" ] ,
42+ 60 * 6
43+ ) ;
44+
45+ expect ( categories ) . toMatchInlineSnapshot ( `
46+ Object {
47+ "Content Security Policy (CSP) Header Not Set": 2,
48+ "Incomplete or No Cache-control and Pragma HTTP Header Set": 1,
49+ "Retrieved from Cache": 1,
50+ "Server Leaks Version Information via \\"Server\\" HTTP Response Header Field": 2,
51+ "Strict-Transport-Security Header Not Set": 1,
52+ "X-Content-Type-Options Header Missing": 2,
53+ "X-Frame-Options Header Not Set": 2,
54+ }
55+ ` ) ;
56+ expect ( severities ) . toMatchInlineSnapshot ( `
57+ Object {
58+ "informational": 1,
59+ "low": 6,
60+ "medium": 4,
61+ }
62+ ` ) ;
63+ } ,
64+ 6 * 60 * 1000
65+ ) ;
You can’t perform that action at this time.
0 commit comments