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

Commit ccf2399

Browse files
committed
#33 Add cascading rule for kube-hunter
1 parent 9849818 commit ccf2399

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: "cascading.experimental.securecodebox.io/v1"
2+
kind: CascadingRule
3+
metadata:
4+
name: "kubernetes-control-plane"
5+
labels:
6+
securecodebox.io/invasive: non-invasive
7+
securecodebox.io/intensive: light
8+
spec:
9+
matches:
10+
anyOf:
11+
# API Server
12+
- category: "Open Port"
13+
attributes:
14+
port: 6443
15+
state: "open"
16+
# etcd API
17+
- category: "Open Port"
18+
attributes:
19+
port: 2379
20+
state: "open"
21+
scanSpec:
22+
scanType: "kube-hunter"
23+
parameters:
24+
- "--remote"
25+
- "{{attributes.ip_address}}"
26+
---
27+
apiVersion: "cascading.experimental.securecodebox.io/v1"
28+
kind: CascadingRule
29+
metadata:
30+
name: "kubernetes-node"
31+
labels:
32+
securecodebox.io/invasive: non-invasive
33+
securecodebox.io/intensive: light
34+
spec:
35+
matches:
36+
anyOf:
37+
# kubelet API
38+
- category: "Open Port"
39+
attributes:
40+
port: 10250
41+
state: "open"
42+
scanSpec:
43+
scanType: "kube-hunter"
44+
parameters:
45+
- "--remote"
46+
- "{{attributes.ip_address}}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# The CascadingRules are not directly in the /templates directory as their curly bracket syntax clashes with helms templates ... :(
2+
# We import them as raw files to avoid these clashes as escaping them is even more messy
3+
{{ range $path, $_ := .Files.Glob "cascading-rules/*" }}
4+
# Include File
5+
{{ $.Files.Get $path }}
6+
# Separate multiple files
7+
---
8+
{{ end }}

0 commit comments

Comments
 (0)