BETA Shoulder is in beta — Findings may sometimes be wrong. Your feedback shapes what we fix next. Share feedback

Service Account Token Auto-Mounted

Description

Detects pods with service account token auto-mounting enabled.

What Shoulder detects

Service account token is automatically mounted into the pod.

How to fix

Disable auto-mounting if not needed.

```yaml
spec:
  automountServiceAccountToken: false
```

Learn more: https://shoulder.dev/learn/kubernetes/cwe-732/automount-service-account

Applies to

Languages

Frameworks

kubernetes

References

Scan for this issue

Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=kubernetes-automount-service-account .

Related rules