Skip to content

Commit 1ab787b

Browse files
committed
Bugfixed DNS error.
1 parent a40b24d commit 1ab787b

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

‎scanners/zap-extended/scanner/scbzapv2/__main__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import sys
55
import time
6+
import errno
67

78
from pathlib import Path
89
from zapv2 import ZAPv2

‎scanners/zap-extended/templates/zap-extended-scan-type.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,5 @@ spec:
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 }}

‎tests/integration/scanner/zap-extended.test.js‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,35 @@ test(
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+
);

0 commit comments

Comments
 (0)