C 0235
Run Kubescape with host sensor (see here)
Framework
cis-eks-t1.2.0, cis-aks-t1.2.0
Severity
Medium
Description of the the issue
The kubelet reads various parameters, including security settings, from a config file specified by the --config
argument. If this file is specified you should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.
Related resources
What does this control test
Ensure that if the kubelet refers to a configuration file with the --config
argument, that file has permissions of 644 or more restrictive.
How to check it manually
First, SSH to the relevant worker node:
To check to see if the Kubelet Service is running:
The output should return Active: active (running) since..
Run the following command on each node to find the appropriate Kubelet config file:
The output of the above command should return something similar to --config /etc/kubernetes/kubelet/kubelet-config.json
which is the location of the Kubelet config file.
Run the following command:
The output of the above command is the Kubelet config file's permissions. Verify that the permissions are 644
or more restrictive.
Remediation
Run the following command (using the config file location identified in the Audit step)
Impact Statement
None.
Default Value
See the AWS EKS documentation for the default value.
Example
No example