Why it matters
`automountServiceAccountToken` is enabled, so every pod using this account receives an API credential whether it needs one or not, and a compromised process can use it.
How to fix it
Set `automountServiceAccountToken: false` on the service account, and enable it per pod where it is needed.
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: Workload has an API token mounted - 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, Workload runs as the default service account, Workload has an API token mounted
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
- Default service account does not turn off token automounting
KubernetesSeverity: Low
k8s.serviceaccount.default-automount
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