-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/global-policy-set : upgrade version for test
- Loading branch information
1 parent
13bcc7f
commit 736c0b9
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
charts/test-krish-globalps/pols/restrict-apparmor-profiles.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
metadata: | ||
name: restrict-apparmor-profiles | ||
annotations: | ||
policies.kyverno.io/title: Restrict AppArmor | ||
policies.kyverno.io/category: Pod Security Standards (Baseline) | ||
policies.kyverno.io/severity: medium | ||
policies.kyverno.io/subject: Pod, Annotation | ||
policies.kyverno.io/minversion: 1.3.0 | ||
kyverno.io/kubernetes-version: "1.22-1.23" | ||
policies.nirmata.io/remediation-docs: "https://docs.nirmata.io/policysets/podsecurity/baseline/restrict-apparmor-profiles/" | ||
policies.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: Audit | ||
background: true | ||
rules: | ||
- name: app-armor | ||
match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Pod | ||
validate: | ||
message: >- | ||
Specifying other AppArmor profiles is disallowed. | ||
pattern: | ||
=(metadata): | ||
=(annotations): | ||
=(container.apparmor.security.beta.kubernetes.io/*): "runtime/default | localhost/*" |