4.6.3 Apply Security Context to Your Pods and Containers


Apply Security Context to Your Pods and Containers


A security context defines the operating system security settings (uid, gid, capabilities, SELinux role, etc..) applied to a container. When designing your containers and pods, make sure that you configure the security context for your pods, containers, and volumes. A security context is a property defined in the deployment yaml. It controls the security parameters that will be assigned to the pod/container/volume. There are two levels of security context: pod level security context, and container level security context.


If you incorrectly apply security contexts, you may have trouble running the pods.

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


Follow the Kubernetes documentation and apply security contexts to your pods. For a suggested list of security contexts, you may refer to the CIS Security Benchmark for Docker Containers.

Default Value:

By default, no security contexts are automatically applied to pods.

See Also


Item Details


References: 800-53|CM-7, 800-53|MA-4, CSCv7|5

Plugin: GCP

Control ID: 491bfc959087dda190cb934a0c43642da7448ac2fc16a497dc2b4b3f8fe6da65