1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 15:37:19 +00:00
kyverno/test/best_practices/disallow_host_pid_ipc.yaml

30 lines
930 B
YAML
Raw Normal View History

---
2019-11-13 13:56:20 -08:00
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
2019-10-11 18:57:16 -07:00
annotations:
2019-11-11 18:21:16 -08:00
policies.kyverno.io/category: Workload Isolation
policies.kyverno.io/description: Sharing the host's PID namespace allows visibility
of process on the host, potentially exposing process information. Sharing the
host's IPC namespace allows the container process to communicate with processes
on the host. To avoid pod container from having visibility to host process space,
validate that 'hostPID' and 'hostIPC' are set to 'false'.
name: disallow-host-pid-ipc
spec:
admission: true
background: true
rules:
- match:
any:
- resources:
kinds:
- Pod
name: validate-hostPID-hostIPC
validate:
message: Use of host PID and IPC namespaces is not allowed
pattern:
spec:
2019-11-07 19:03:09 -08:00
=(hostIPC): "false"
=(hostPID): "false"
validationFailureAction: Audit