1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 18:38:40 +00:00

fix policy

This commit is contained in:
Jim Bugwadia 2019-11-07 19:03:09 -08:00
parent fa7d4a8868
commit 43e76e1237

View file

@ -1,7 +1,7 @@
apiVersion: kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: validate-hostpid-hostipc
name: validate-host-pid-ipc
annotations:
policies.kyverno.io/category: Security
policies.kyverno.io/description: Sharing the host's PID namespace allows visibility of process
@ -9,15 +9,16 @@ metadata:
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'.
spec:
validationFailureAction: enforce
rules:
- name: validate-hostpid-hostipc
- name: validate-host-pid-ipc
match:
resources:
kinds:
- Pod
validate:
message: "Disallow use of host's pid namespace and host's ipc namespace"
message: "Use of host PID and IPC namespaces is not allowed"
pattern:
spec:
(hostPID): "!true"
hostIPC: false
=(hostPID): "false"
=(hostIPC): "false"