forked from elastic/csp-security-policies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.yaml
45 lines (41 loc) · 2.14 KB
/
data.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
metadata:
id: 73fa944c-a62c-5371-a011-0e17bf85f79f
name: Ensure that the admission control plugin AlwaysPullImages is set
rule_number: 1.2.12
profile_applicability: '* Level 1 - Master Node'
description: Always pull images.
rationale: |-
Setting admission control policy to `AlwaysPullImages` forces every new pod to pull the required images every time.
In a multi-tenant cluster users can be assured that their private images can only be used by those who have the credentials to pull them.
Without this admission control policy, once an image has been pulled to a node, any pod from any user can use it simply by knowing the image’s name, without any authorization check against the image ownership.
When this plug-in is enabled, images are always pulled prior to starting containers, which means valid credentials are required.
audit: |-
Run the following command on the Control Plane node:
```
ps -ef | grep kube-apiserver
```
Verify that the `--enable-admission-plugins` argument is set to a value that includes `AlwaysPullImages`.
remediation: |-
Edit the API server pod specification file `/etc/kubernetes/manifests/kube-apiserver.yaml` on the Control Plane node and set the `--enable-admission-plugins` parameter to include `AlwaysPullImages`.
```
--enable-admission-plugins=...,AlwaysPullImages,...
```
impact: |-
Credentials would be required to pull the private images every time. Also, in trusted environments, this might increases load on network, registry, and decreases speed.
This setting could impact offline or isolated clusters, which have images pre-loaded and do not have access to a registry to pull in-use images. This setting is not appropriate for clusters which use this configuration.
default_value: |
By default, AlwaysPullImages is not set.
references: |-
1. https://kubernetes.io/docs/admin/kube-apiserver/
2. https://kubernetes.io/docs/admin/admission-controllers/#alwayspullimages
section: API Server
version: '1.0'
tags:
- CIS
- Kubernetes
- CIS 1.2.12
- API Server
benchmark:
name: CIS Kubernetes V1.23
version: v1.0.1
id: cis_k8s