4.2.1 Ensure that the cluster enforces Pod Security Standard Baseline profile or stricter for all namespaces.

Information

The Pod Security Standard Baseline profile defines a baseline for container security. You can enforce this by using the built-in Pod Security Admission controller.

Without an active mechanism to enforce the Pod Security Standard Baseline profile, it is not possible to limit the use of containers with access to underlying cluster nodes, via mechanisms like privileged containers, or the use of hostPath volume mounts.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

Ensure that Pod Security Admission is in place for every namespace which contains user workloads.

Run the following command to enforce the Baseline profile in a namespace:

kubectl label namespace pod-security.kubernetes.io/enforce=baseline

Impact:

Enforcing a baseline profile will limit the use of containers.

See Also

https://workbench.cisecurity.org/benchmarks/16093