On supported hosts, the 'runtime/default' AppArmor profile is applied by default. The default policy should prevent overriding or disabling the policy, or restrict overrides to an allowed set of profiles. This policy ensures Pods do not specify any other AppArmor profiles than `runtime/default` or `localhost/*`.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: restrict-apparmor-profilesannotations:policies.kyverno.io/title: Restrict AppArmorpolicies.kyverno.io/category: Pod Security Standards (Baseline)policies.kyverno.io/severity: mediumpolicies.kyverno.io/subject: Pod, Annotationpolicies.kyverno.io/minversion: 1.3.0kyverno.io/kyverno-version: 1.6.0kyverno.io/kubernetes-version: 1.22-1.23policies.kyverno.io/description: On supported hosts, the 'runtime/default' AppArmor profile is applied by default. The default policy should prevent overriding or disabling the policy, or restrict overrides to an allowed set of profiles. This policy ensures Pods do not specify any other AppArmor profiles than `runtime/default` or `localhost/*`.spec:validationFailureAction: Enforcebackground: truerules:- name: app-armormatch:any:- resources:kinds:- Podvalidate:message: Specifying other AppArmor profiles is disallowed. The annotation `container.apparmor.security.beta.kubernetes.io` if defined must not be set to anything other than `runtime/default` or `localhost/*`.pattern:"=(metadata)":"=(annotations)":"=(container.apparmor.security.beta.kubernetes.io/*)": runtime/default | localhost/*
This policy performs some best practices validation on Application fields. Path or chart must be specified but never both. And destination.name or destination.server must be specified but never both.
This policy prevents the use of the default project in an Application.
This policy prevents updates to the project field after an Application is created.