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

Commit 92557ea

Browse files
committed
Hosts run nikto scans on http(s) ports
1 parent dc86cb1 commit 92557ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

operator/controllers/targets/host_controller.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ func CreateScanTemplatesForHost(host targetsv1.Host) []ScanTemplates {
184184
},
185185
})
186186
}
187+
if port.Type == "http" || port.Type == "https" {
188+
scanTemplates = append(scanTemplates, ScanTemplates{
189+
Port: port.Port,
190+
Type: port.Type,
191+
ScanSpec: executionv1.ScanSpec{
192+
ScanType: "nikto",
193+
Parameters: []string{"-h", fmt.Sprintf("%s://%s", port.Type, host.Spec.Hostname), "-p", fmt.Sprintf("%d", port.Port), "-Tuning", "1,2,3,5,7,b"},
194+
},
195+
})
196+
}
187197
}
188198

189199
return scanTemplates

0 commit comments

Comments
 (0)