Impact & Risk Analysis
- Severity: Medium
- CIS Benchmark: CIS 5.1.5
- Impact: Implicit Privilege & Audit Gaps. Every namespace has a
defaultservice account. If you do not specify a service account for a Pod, it uses this default one. If this account is inadvertently granted permissions, every pod in that namespace inherits those permissions. This makes it impossible to audit which specific application performed an action and violates the principle of least privilege.
Common Misconfiguration
LeavingautomountServiceAccountToken: true (the default) on the default service account. This means every pod gets a JWT token mounted at /var/run/secrets/kubernetes.io/serviceaccount, even if the application doesn’t need to talk to the Kubernetes API.
Vulnerable Example
Secure Example
Audit Procedure
For each namespace in the cluster, ensure that theautomountServiceAccountToken setting is set to false for the default service account.
- Result: The output should show
falsefor every namespace. - Fail: If the output shows
trueor is empty (which impliestrueby default).
default service account.
Remediation
- Create Explicit Accounts: Create specific service accounts for any workload that actually requires access to the Kubernetes API.
- Disable Default Token: Modify the
defaultservice account in every namespace to disable automatic token mounting.

