Ensure that containers are prohibited from being admitted if they have "allowPrivilegeEscalation" set to true. The "allowPrivilegeEscalation" flag should be restricted because allowing privilege escalation can enable a process within the container to gain rights beyond those initially granted, potentially leading to a security breach.
A container with **allowPrivilegeEscalation: true** can allow processes to gain more privileges than their parent. To maintain security, you must define an admission control policy to prevent this setting. If you require privilege escalation or setuid binaries, isolate these containers under a separate, highly restricted policy.
Audit
To determine if the containers are permitted to operate with the "allowPrivilegeEscalation" flag set to true, perform the following operations:
Remediation / Resolution
To ensure that containers are not permitted to run with the "allowPrivilegeEscalation" 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
- Pod Security Admission