Host namespaces (Process ID namespace, Inter-Process Communication namespace, and network namespace) allow access to shared information and can be used to elevate privileges. Pods should not be allowed access to host namespaces. This policy ensures fields which make use of these host namespaces are unset or set to `false`.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: disallow-host-namespacesannotations:policies.kyverno.io/title: Disallow Host Namespacespolicies.kyverno.io/category: Pod Security Standards (Baseline)policies.kyverno.io/severity: mediumkyverno.io/kyverno-version: 1.6.0kyverno.io/kubernetes-version: 1.22-1.23policies.kyverno.io/subject: Podpolicies.kyverno.io/description: Host namespaces (Process ID namespace, Inter-Process Communication namespace, and network namespace) allow access to shared information and can be used to elevate privileges. Pods should not be allowed access to host namespaces. This policy ensures fields which make use of these host namespaces are unset or set to `false`.spec:validationFailureAction: Auditbackground: truerules:- name: host-namespacesmatch:any:- resources:kinds:- Podvalidate:message: Sharing the host namespaces is disallowed. The fields spec.hostNetwork, spec.hostIPC, and spec.hostPID must be unset or set to `false`.pattern:spec:"=(hostPID)": "false""=(hostIPC)": "false""=(hostNetwork)": "false"
This policy prevents the use of the default project in an Application.
This policy ensures that the name of the ApplicationSet is the same value provided in the project.
Services of type LoadBalancer when deployed inside AWS have support for transport encryption if it is enabled via an annotation. This policy requires that Services of type LoadBalancer contain the annotation service.beta.kubernetes.io/aws-load-balancer-ssl-cert with some value.