Why it matters
Every pod in the namespace shares the default service account, so a permission granted to one is granted to all.
How to fix it
Create a service account for the workload and set `serviceAccountName`.
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.5: Default service accounts are not actively used. Also checked for this control: A role is bound to a default service account, Default service account does not turn off token automounting - 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 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
- Workload runs in the default namespace
KubernetesSeverity: Low
k8s.workload.default-namespace - Workload shares the host IPC namespace
KubernetesSeverity: High
k8s.workload.host-ipc - Workload runs as a service account with cluster-admin
KubernetesSeverity: Critical
k8s.workload.cluster-admin-identity - 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