Skip to main content

lacework-global-344

note

This policy has been deprecated in favor of lacework-global-655.

See Adjusted Rules - CIS Amazon EKS 1.1.0 for further details.

4.2.8 Minimize the admission of containers with added capabilities (Automated)

note

This rule has been changed to automated, see Automated Rules for CIS Amazon EKS 1.1.0 for details.

Profile Applicability

• Level 1

Description

Do not generally permit containers with capabilities assigned beyond the default set.

Rationale

Containers run with a default set of capabilities as assigned by the Container Runtime. Capabilities outside this set can be added to containers which could expose them to risks of container breakout attacks.

There should be at least one PodSecurityPolicy (PSP) defined which prevents containers with capabilities beyond the default set from launching.

If you need to run containers with additional capabilities, this should be defined in a separate PSP and you should carefully check RBAC controls to ensure that only limited service accounts and users are given permission to access that PSP.

Impact

Pods with containers which require capabilities outwith the default set will not be permitted.

Audit

Get the set of PSPs with the following command:

kubectl get psp

Verify that there are no PSPs present which have allowedCapabilities set to anything other than an empty array.

Remediation

Ensure that allowedCapabilities is not present in PSPs for the cluster unless it is set to an empty array.

References

https://kubernetes.io/docs/concepts/policy/pod-security-policy/#enabling-pod-security-policies
https://www.nccgroup.trust/uk/our-research/abusing-privileged-and-unprivileged-linux-containers/