Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
feat(mounts): update list of sensitive paths from Falco, adds contain…
Browse files Browse the repository at this point in the history
…erd (#463)
  • Loading branch information
Benzhaomin authored Aug 11, 2022
1 parent b3342d7 commit df0fd92
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions auditors/mounts/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const (
SensitivePathsMounted = "SensitivePathsMounted"
)

// DefaultSensitivePaths is the default list of sensitive mount paths (from Falco rule: https://github.com/falcosecurity/falco/blob/master/rules/k8s_audit_rules.yaml#L155)
var DefaultSensitivePaths = []string{"/proc", "/var/run/docker.sock", "/", "/etc", "/root", "/var/run/crio/crio.sock", "/home/admin", "/var/lib/kubelet", "/var/lib/kubelet/pki", "/etc/kubernetes", "/etc/kubernetes/manifests"}
// DefaultSensitivePaths is the default list of sensitive mount paths (from Falco rule: https://github.com/falcosecurity/falco/blob/master/rules/falco_rules.yaml#L1945)
var DefaultSensitivePaths = []string{"/proc", "/var/run/docker.sock", "/", "/etc", "/root", "/var/run/crio/crio.sock", "/run/containerd/containerd.sock", "/home/admin", "/var/lib/kubelet", "/var/lib/kubelet/pki", "/etc/kubernetes", "/etc/kubernetes/manifests"}

const overrideLabelPrefix = "allow-host-path-mount-"

Expand Down
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ auditors:
cpu: "750m"
memory: "500m"
mounts:
denyPathsList: ["/proc", "/var/run/docker.sock", "/", "/etc", "/root", "/var/run/crio/crio.sock", "/home/admin", "/var/lib/kubelet", "/var/lib/kubelet/pki", "/etc/kubernetes", "/etc/kubernetes/manifests"]
denyPathsList: ["/proc", "/var/run/docker.sock", "/", "/etc", "/root", "/var/run/crio/crio.sock", "/run/containerd/containerd.sock", /home/admin", "/var/lib/kubelet", "/var/lib/kubelet/pki", "/etc/kubernetes", "/etc/kubernetes/manifests"]
28 changes: 15 additions & 13 deletions docs/auditors/mounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ Also see [Global Flags](/README.md#global-flags)

#### Default sensitive host paths list

| Host path | Description |
| :------------------------ | :--------------------------------------------------------------------------------------- |
| /proc | Pseudo-filesystem which provides an interface to kernel data structures |
| /var/run/docker.sock | Unix socket used to communicate with Docker daemon |
| / | Filesystem's root |
| /etc | Directory that usually contains all system related configurations files |
| /root | Home directory of the `root` user |
| /var/run/crio/crio.sock | Unix socket used to communicate with the CRI-O Container Engine |
| /home/admin | Home directory of the `admin` user |
| /var/lib/kubelet | Directory for Kublet-related configuration |
| /var/lib/kubelet/pki | Directory containing the certificate and private key of the kublet |
| /etc/kubernetes | Directory containing Kubernetes related configuration |
| /etc/kubernetes/manifests | Directory containing manifest of Kubernetes components |
| Host path | Description |
| :------------------------------ | :---------------------------------------------------------------------- |
| /proc | Pseudo-filesystem which provides an interface to kernel data structures |
| / | Filesystem's root |
| /etc | Directory that usually contains all system related configurations files |
| /root | Home directory of the `root` user |
| /var/run/docker.sock | Unix socket used to communicate with Docker daemon |
| /var/run/crio/crio.sock | Unix socket used to communicate with the CRI-O Container Engine |
| /run/containerd/containerd.sock | Unix socket used to communicate with the Containerd container runtime |
| /home/admin | Home directory of the `admin` user |
| /var/lib/kubelet | Directory for Kublet-related configuration |
| /var/lib/kubelet/pki | Directory containing the certificate and private key of the kublet |
| /etc/kubernetes | Directory containing Kubernetes related configuration |
| /etc/kubernetes/manifests | Directory containing manifest of Kubernetes components |


## Examples

Expand Down

0 comments on commit df0fd92

Please sign in to comment.