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

Commit e476530

Browse files
committed
#33 Expand declarative hook test to capture $.hostOrIP helper
1 parent 38eb28c commit e476530

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hooks/declarative-subsequent-scans/hook.test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ beforeEach(() => {
4545
},
4646
scanSpec: {
4747
scanType: "sslyze",
48-
parameters: ["--regular", "{{attributes.hostname}}"]
48+
parameters: ["--regular", "{{$.hostOrIP}}:{{attributes.port}}"]
4949
}
5050
}
5151
}
@@ -80,7 +80,7 @@ test("should create subsequent scans for open HTTPS ports (NMAP findings)", () =
8080
"name": "sslyze-foobar.com-tls-scans",
8181
"parameters": Array [
8282
"--regular",
83-
"foobar.com",
83+
"foobar.com:443",
8484
],
8585
"scanType": "sslyze",
8686
},
@@ -118,7 +118,8 @@ test("should not try to do magic to the scan name if its something random", () =
118118
category: "Open Port",
119119
attributes: {
120120
state: "open",
121-
hostname: "foobar.com",
121+
hostname: undefined,
122+
ip_address: "10.42.42.42",
122123
port: 443,
123124
service: "https"
124125
}
@@ -139,7 +140,7 @@ test("should not try to do magic to the scan name if its something random", () =
139140
"name": "foobar.com-tls-scans",
140141
"parameters": Array [
141142
"--regular",
142-
"foobar.com",
143+
"10.42.42.42:443",
143144
],
144145
"scanType": "sslyze",
145146
},

0 commit comments

Comments
 (0)