Risk Level: Medium (should be achieved)
Ensure that service account tokens are only mounted in pods where the workload explicitly requires communication with the Kubernetes API server. Setting automountServiceAccountToken to false on the pod specification is the recommended secure state.
Mounting service account tokens in a pod enables privilege escalation if the pod is compromised. Disabling token auto-mounting removes this potential attack vector and enhance security.
Audit
To determine if service account tokens are only mounted where necessary, perform the following operations:
Remediation / Resolution
To ensure the service account tokens are only mounted where strictly necessary, perform the following actions:
References
- Oracle Cloud Infrastructure Documentation
- Overview of Kubernetes Engine (OKE)
- Managing Kubernetes Clusters
- Setting Up Cluster Access
- Accessing a Cluster Using Kubectl
- About Access Control and Kubernetes Engine (OKE)
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster create-kubeconfig
- Kubernetes Documentation
- Configure Service Accounts for Pods
Publication date Dec 11, 2025