Check: CNTR-K8-000440
Kubernetes STIG:
CNTR-K8-000440
(in versions v1 r6 through v1 r0.1)
Title
The Kubernetes kubelet static PodPath must not enable static pods. (Cat I impact)
Discussion
Allowing kubelet to set a staticPodPath gives containers with root access permissions to traverse the hosting filesystem. The danger comes when the container can create a manifest file within the /etc/kubernetes/manifests directory. When a manifest is created within this directory, containers are entirely governed by the Kubelet not the API Server. The container is not susceptible to admission control at all. Any containers or pods that are instantiated in this manner are called "static pods" and are meant to be used for pods such as the API server, scheduler, controller, etc., not workload pods that need to be governed by the API Server.
Check Content
On the Master and Worker nodes, change to the /etc/sysconfig/ directory and run the command: grep -i staticPodPath kubelet If any of the nodes return a value for staticPodPath, this is a finding.
Fix Text
Edit the kubelet file on each node under the /etc/sysconfig directory to remove the staticPodPath setting and restart the kubelet service by executing the command: service kubelet restart
Additional Identifiers
Rule ID: SV-242397r712547_rule
Vulnerability ID: V-242397
Group Title: SRG-APP-000033-CTR-000090
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000213 |
Enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies. |
Controls
Number | Title |
---|---|
AC-3 |
Access Enforcement |