Why it matters
The pod receives a Kubernetes API token, because neither it nor its service account turns automounting off. Most workloads never call the API, and a stolen token is a foothold.
How to fix it
Set `automountServiceAccountToken: false` on the pod or its service account.
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.6: Service account tokens are mounted only where necessary. Also checked for this control: Service account mounts its token by default - NSA/CISA Kubernetes Hardening Guidance 1.2, control
pod.service-account-tokens: Pod service account tokens are protected. Also checked for this control: Default service account does not turn off token automounting, Service account mounts its token by default, Workload runs as the default service account
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 mounts the container runtime socket
KubernetesSeverity: Critical
k8s.workload.runtime-socket - Workload sets an unsafe sysctl
KubernetesSeverity: Medium
k8s.workload.unsafe-sysctl - Workload shares the host process namespace
KubernetesSeverity: High
k8s.workload.host-pid - Workload mounts a host path
KubernetesSeverity: High
k8s.workload.host-path - Workload shares the host network
KubernetesSeverity: High
k8s.workload.host-network - Workload shares the host IPC namespace
KubernetesSeverity: High
k8s.workload.host-ipc
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