Why it matters
`allowPrivilegeEscalation` is enabled, so a process in this container can gain more privileges than its parent, which defeats running as a non-root user.
How to fix it
Set `allowPrivilegeEscalation: false` on the container's security context.
What TrustIvan reads
Read through the Kubernetes API with the read-only role TrustIvan's install creates.
Benchmark controls
- CIS Kubernetes Benchmark 1.9.0, control
5.2.6: Containers allowing privilege escalation are minimised - NSA/CISA Kubernetes Hardening Guidance 1.2, control
pod.security-enforcement: Pod security is enforced. Also checked for this control: Container keeps the default capabilities, Container adds a dangerous capability, Container runs privileged, Container mounts /proc unmasked, Container runs as a Windows HostProcess, Namespace enforces no Pod Security Standard, Namespace enforces only Pod Security baseline, Workload shares the host IPC namespace, Workload shares the host network, Workload mounts a host path, Workload shares the host process namespace, Workload mounts the container runtime socket
Control numbers are the published ones; the titles are TrustIvan's own short descriptions. The benchmarks belong to their publishers, who do not endorse TrustIvan.
Related checks
- Nothing requires the container to run as non-root
KubernetesSeverity: Low
k8s.container.non-root-not-enforced - Container runs privileged
KubernetesSeverity: Critical
k8s.container.privileged - Container has no memory request
KubernetesSeverity: Low
k8s.container.no-memory-request - Container runs with the root group
KubernetesSeverity: Low
k8s.container.root-group - Container has no memory limit
KubernetesSeverity: Low
k8s.container.no-memory-limit - Container runs as root
KubernetesSeverity: Medium
k8s.container.runs-as-root
Terms: KSPM (Kubernetes security posture management), Kubernetes RBAC, NSA/CISA Kubernetes Hardening Guidance, CIS Benchmarks
All Kubernetes posture checks · The whole catalogue · How this works in TrustIvan · Documentation