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

Commit 38eb28c

Browse files
committed
#33 Use $.hostOrIP across CascadingRules
1 parent 6b6e1a2 commit 38eb28c

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

scanners/kube-hunter/cascading-rules/remote-kubernetes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
scanType: "kube-hunter"
2323
parameters:
2424
- "--remote"
25-
- "{{attributes.ip_address}}"
25+
- "{{$.hostOrIP}}"
2626
---
2727
apiVersion: "cascading.experimental.securecodebox.io/v1"
2828
kind: CascadingRule
@@ -43,4 +43,4 @@ spec:
4343
scanType: "kube-hunter"
4444
parameters:
4545
- "--remote"
46-
- "{{attributes.ip_address}}"
46+
- "{{$.hostOrIP}}"

scanners/nikto/cascading-rules/http.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
parameters:
2222
- "-host"
2323
# Use Hostname if defined, fall back to ip if not defined
24-
- "{{#attributes.hostname}}{{attributes.hostname}}{{/attributes.hostname}}{{^attributes.hostname}}{{attributes.ip_address}}{{/attributes.hostname}}"
24+
- "{{$.hostOrIP}}"
2525
- "-port"
2626
- "{{attributes.port}}"
2727
- "-Tuning"

scanners/nmap/cascading-rules/smb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ spec:
3131
- "--script"
3232
- "smb-protocols"
3333
# Against Host
34-
- "{{attributes.hostname}}"
34+
- "{{$.hostOrIP}}"

scanners/ssh_scan/cascading-rules/ssh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ spec:
2020
scanType: "ssh-scan"
2121
parameters:
2222
- "--target"
23-
- "{{attributes.hostname}}"
23+
- "{{$.hostOrIP}}"
2424
- "--port"
2525
- "{{attributes.port}}"

scanners/sslyze/cascading-rules/https.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spec:
1818
state: open
1919
scanSpec:
2020
scanType: "sslyze"
21-
parameters: ["--regular", "{{attributes.hostname}}:{{attributes.port}}"]
21+
parameters: ["--regular", "{{$.hostOrIP}}:{{attributes.port}}"]

scanners/sslyze/cascading-rules/mail.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
state: open
1919
scanSpec:
2020
scanType: "sslyze"
21-
parameters: ["--regular", "{{attributes.hostname}}:{{attributes.port}}"]
21+
parameters: ["--regular", "{{$.hostOrIP}}:{{attributes.port}}"]
2222
---
2323
apiVersion: "cascading.experimental.securecodebox.io/v1"
2424
kind: CascadingRule
@@ -40,7 +40,7 @@ spec:
4040
state: open
4141
scanSpec:
4242
scanType: "sslyze"
43-
parameters: ["--regular", "{{attributes.hostname}}:{{attributes.port}}"]
43+
parameters: ["--regular", "{{$.hostOrIP}}:{{attributes.port}}"]
4444
---
4545
apiVersion: "cascading.experimental.securecodebox.io/v1"
4646
kind: CascadingRule
@@ -62,4 +62,4 @@ spec:
6262
state: open
6363
scanSpec:
6464
scanType: "sslyze"
65-
parameters: ["--regular", "{{attributes.hostname}}:{{attributes.port}}"]
65+
parameters: ["--regular", "{{$.hostOrIP}}:{{attributes.port}}"]

scanners/zap/cascading-rules/http.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spec:
1818
state: open
1919
scanSpec:
2020
scanType: "zap-baseline"
21-
parameters: ["-t", "{{attributes.service}}://{{attributes.hostname}}"]
21+
parameters: ["-t", "{{attributes.service}}://{{$.hostOrIP}}"]

0 commit comments

Comments
 (0)