Ensure that containers are prohibited from being admitted if they have "securityContext.privileged" set to true. The "securityContext.privileged" flag should be restricted because it gives the container nearly all the capabilities of the host machine's root user.
When a container is run with securityContext.privileged: true, it essentially disables the security isolation that is the foundation of container technology. This flag bypasses most Linux kernel security mechanisms, including AppArmor, SELinux, and Seccomp profiles, that would normally restrict the container's actions.
Audit
To determine if the containers are permitted to operate with the "securityContext.privileged" flag set to true, perform the following operations:
Remediation / Resolution
To ensure that containers are not permitted to run with the "securityContext.privileged" flag set to true, perform the following operations:
References
- Oracle Cloud Infrastructure Documentation
- Overview of Kubernetes Engine (OKE)
- Managing Kubernetes Clusters
- Setting Up Cluster Access
- Accessing a Cluster Using Kubectl
- About Access Control and Kubernetes Engine (OKE)
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster create-kubeconfig
- Kubernetes Documentation
- Using RBAC Authorization