C-0200 - Minimize the admission of containers with added capabilities

Framework

cis-v1.23-t1.0.1

Severity

Medium

Description of the the issue

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 policy 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 policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.

Related resources

MutatingWebhookConfiguration, Namespace, ValidatingWebhookConfiguration

What does this control test

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

How to check it manually

List the policies in use for each namespace in the cluster, ensure that policies are present which prevent allowedCapabilities to be set to anything other than an empty array.

Remediation

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

Impact Statement

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

Default Value

By default, there are no restrictions on adding capabilities to containers.

Example

No example