Why it matters
The container is explicitly configured to run as UID 0. A vulnerability in the process is a root process on the node's kernel.
How to fix it
Set `runAsNonRoot: true` and a non-zero `runAsUser`, and build the image with a non-root user.
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.7: Root containers are minimised. Also checked for this control: Nothing requires the container to run as non-root - NSA/CISA Kubernetes Hardening Guidance 1.2, control
pod.non-root: Containers run as non-root users. Also checked for this control: Nothing requires the container to run as non-root, Container runs with the root group
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
- Container runs with the root group
KubernetesSeverity: Low
k8s.container.root-group - Container explicitly disables seccomp
KubernetesSeverity: Medium
k8s.container.seccomp-unconfined - Container runs privileged
KubernetesSeverity: Critical
k8s.container.privileged - Container has no seccomp profile
KubernetesSeverity: Low
k8s.container.seccomp-unset - Container may escalate privileges
KubernetesSeverity: Medium
k8s.container.privilege-escalation - Container reads a Secret through environment variables
KubernetesSeverity: Low
k8s.container.secret-in-env
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