C-0202 - Minimize the admission of Windows HostProcess Containers
Framework
cis-v1.10.0
Severity
High
Description of the the issue
A Windows container making use of the hostProcess flag can interact with the underlying Windows cluster node. As per the Kubernetes documentation, this provides "privileged access" to the Windows node.
Where Windows containers are used inside a Kubernetes cluster, there should be at least one admission control policy which does not permit hostProcess Windows containers.
If you need to run Windows containers which require hostProcess, 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 Windows containers to be run with the hostProcess flag set to true.
How to check it manually
List the policies in use for each namespace in the cluster, ensure that each policy disallows the admission of hostProcess containers
Remediation
Add policies to each namespace in the cluster which has user workloads to restrict the admission of hostProcess containers.
Impact Statement
Pods defined with securityContext.windowsOptions.hostProcess: true will not be permitted unless they are run under a specific policy.
Default Value
By default, there are no restrictions on the creation of hostProcess containers.
Example
No example
Updated 3 months ago
