Why it matters
The pod's service account is bound to cluster-admin, so code execution in this pod is control of the whole cluster.
How to fix it
Bind the service account to a role with only the permissions the workload uses.
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.1.1: cluster-admin is bound only where required. Also checked for this control: cluster-admin is granted - NSA/CISA Kubernetes Hardening Guidance 1.2, control
authn.rbac: Role-based access control grants least privilege. Also checked for this control: cluster-admin is granted, Role can escalate, bind or impersonate, Role can use the nodes/proxy subresource, Role can create pods, Role can exec into or attach to pods, Role can read Secrets, Role uses a wildcard
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
- Workload runs in the default namespace
KubernetesSeverity: Low
k8s.workload.default-namespace - Workload runs as the default service account
KubernetesSeverity: Low
k8s.workload.default-service-account - Workload shares the host IPC namespace
KubernetesSeverity: High
k8s.workload.host-ipc - Workload shares the host network
KubernetesSeverity: High
k8s.workload.host-network - Workload mounts a host path
KubernetesSeverity: High
k8s.workload.host-path - Workload shares the host process namespace
KubernetesSeverity: High
k8s.workload.host-pid
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