5.2.1 Minimize the admission of privileged containers

Information

Do not generally permit containers to be run with the securityContext.privileged flag set to true

Privileged containers have access to all Linux Kernel capabilities and devices. A container running with full privileges can do almost everything that the host can do. This flag exists to allow special use-cases, like manipulating the network stack and accessing devices.

There should be at least one Security Context Constraint (SCC) defined which does not permit privileged containers.

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

Solution

Create an SCC that sets allowPrivilegedContainer to false and take it into use by assigning it to applicable users and groups.

Impact:

Pods defined with spec.containers[].securityContext.privileged: true will not be permitted.

See Also

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

Item Details

Category: ACCESS CONTROL, SYSTEM AND INFORMATION INTEGRITY

References: 800-53|AC-6(2), 800-53|AC-6(5), 800-53|AC-17(3), 800-53|SI-7, CSCv7|4.3

Plugin: OpenShift

Control ID: 04949e7b935b8d1d88cbc069ba19e5de9a9d7eed981ed530aff9450db62bddf3