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

Commit 65cd9a4

Browse files
committed
Fixing testpipeline errors
1 parent dfd71d6 commit 65cd9a4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

hooks/nmap-subsequent-scans/hook.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ kc.loadFromDefault();
77
const k8sApiCRD = kc.makeApiClient(k8s.CustomObjectsApi);
88

99
async function handle({
10-
getFindings,
11-
attributeName = process.env["ATTRIBUTE_NAME"],
12-
attributeValue = process.env["ATTRIBUTE_VALUE"],
10+
getFindings
1311
}) {
1412

1513
const findings = await getFindings();
@@ -29,24 +27,18 @@ async function handle({
2927

3028
// search for HTTP ports and start subsequent Nikto Scan
3129
if(finding.attributes.service == "http" ) {
32-
console.log(" --> starting HTTP Service Scan: Nikto")
33-
3430
startNiktoScan(finding.attributes.hostname, finding.attributes.port);
3531
}
3632

3733
// search for HTTPS ports and start subsequent SSLyze Scan
3834
if(finding.attributes.service == "ssl" || finding.attributes.service == "https") {
39-
console.log(" --> starting HTTP(S) Service Scan: SSLyze")
4035
startSSLyzeScan(finding.attributes.hostname, finding.attributes.port);
4136

42-
console.log(" --> starting HTTP(S) Service Scan: ZAP Baseline Scan")
4337
startZAPBaselineScan(finding.attributes.hostname, finding.attributes.port);
4438
}
4539

4640
// search for HTTPS ports and start subsequent SSH Scan
4741
if(finding.attributes.service == "ssh" ) {
48-
console.log(" --> starting SSH Service Scan: SSH")
49-
5042
startSSHScan(finding.attributes.hostname, finding.attributes.port);
5143
}
5244
}
@@ -81,6 +73,8 @@ async function handle({
8173
* @param {*} port The port to start a new subsequent ZAP scan for.
8274
*/
8375
function startZAPBaselineScan(hostname, port) {
76+
console.log(" --> starting subsequent ZAP Scan for host: " + hostname + ":" + port);
77+
8478
const zapScanDefinition = {
8579
apiVersion: "execution.experimental.securecodebox.io/v1",
8680
kind: "Scan",
@@ -122,6 +116,8 @@ function startZAPBaselineScan(hostname, port) {
122116
* @param {*} port The port to start a new subsequent SSH scan for.
123117
*/
124118
function startSSHScan(hostname, port) {
119+
console.log(" --> starting subsequent SSH Scan for host: " + hostname + ":" + port);
120+
125121
const sshScanDefintion = {
126122
"apiVersion": "execution.experimental.securecodebox.io/v1",
127123
"kind": "Scan",
@@ -163,6 +159,8 @@ function startSSHScan(hostname, port) {
163159
* @param {*} port The port to start a new subsequent Nikto scan for.
164160
*/
165161
function startNiktoScan(hostname, port) {
162+
console.log(" --> starting subsequent Nikto Scan for host: " + hostname + ":" + port);
163+
166164
const niktoScanDefinition = {
167165
"apiVersion": "execution.experimental.securecodebox.io/v1",
168166
"kind": "Scan",
@@ -206,6 +204,8 @@ function startNiktoScan(hostname, port) {
206204
* @param {*} port The port to start a new subsequent SSLyze scan for.
207205
*/
208206
function startSSLyzeScan(hostname, port) {
207+
console.log(" --> starting subsequent SSLyze Scan for host: " + hostname + ":" + port);
208+
209209
const sslyzeScanDefinition = {
210210
apiVersion: 'execution.experimental.securecodebox.io/v1',
211211
kind: 'Scan',

0 commit comments

Comments
 (0)