mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
25 lines
666 B
YAML
25 lines
666 B
YAML
apiVersion: kyverno.io/v1alpha1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: validate-deny-privileged-priviligedescalation
|
|
spec:
|
|
rules:
|
|
- name: deny-privileged-priviligedescalation
|
|
exclude:
|
|
match:
|
|
resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
message: "Privileged mode is not allowed. Set allowPrivilegeEscalation and privileged to false"
|
|
anyPattern:
|
|
- spec:
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
privileged: false
|
|
- spec:
|
|
containers:
|
|
- name: "*"
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
privileged: false
|