All Policies

Disallow Helm Tiller

Tiller, found in Helm v2, has known security challenges. It requires administrative privileges and acts as a shared resource accessible to any authenticated user. Tiller can lead to privilege escalation as restricted users can impact other users. It is recommended to use Helm v3+ which does not contain Tiller for these reasons. This policy validates that there is not an image containing the name `tiller`.

Policy Definition

/best-practices/disallow-helm-tiller/disallow-helm-tiller.yaml

 1apiVersion: kyverno.io/v1
 2kind: ClusterPolicy
 3metadata:
 4  name: disallow-helm-tiller
 5  annotations:
 6    policies.kyverno.io/title: Disallow Helm Tiller
 7    policies.kyverno.io/category: Sample
 8    policies.kyverno.io/minversion: 1.6.0
 9    policies.kyverno.io/severity: medium
10    policies.kyverno.io/subject: Pod
11    policies.kyverno.io/description: >-
12      Tiller, found in Helm v2, has known security challenges. It requires administrative privileges and acts as a shared
13      resource accessible to any authenticated user. Tiller can lead to privilege escalation as
14      restricted users can impact other users. It is recommended to use Helm v3+ which does not contain
15      Tiller for these reasons. This policy validates that there is not an image
16      containing the name `tiller`.
17spec:
18  validationFailureAction: Audit
19  background: true
20  rules:
21    - name: validate-helm-tiller
22      match:
23        any:
24        - resources:
25            kinds:
26              - Pod
27      validate:
28        message: "Helm Tiller is not allowed"
29        foreach:
30        - list: "request.object.spec.containers"
31          pattern:
32            image: "!*tiller*"
33        - list: "request.object.spec.initContainers"
34          pattern:
35            image: "!*tiller*"
36        - list: "request.object.spec.ephemeralContainers"
37          pattern:
38            image: "!*tiller*"