More Info:
Verifies no (Cluster)RoleBinding targets system:anonymous or system:unauthenticated. Such bindings grant access to unauthenticated callers.Risk Level
CriticalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Review current violating bindings (any machine with kubectl access):
-
For each offending RoleBinding, inspect details and confirm it is safe to remove (any machine with kubectl access):
-
Delete offending RoleBindings that reference
system:anonymousorsystem:unauthenticated(any machine with kubectl access): -
If a deleted binding was legitimately needed, recreate a safer binding to an authenticated subject (any machine with kubectl access). Example pattern:
or for cluster-wide:
-
If bindings are managed via manifests or GitOps, update the source manifests to remove any subjects named
system:anonymousorsystem:unauthenticatedso they are not re-applied (edit locally, then apply from any machine with kubectl access): -
Verification (any machine with kubectl access):
The command should output only:
Using kubectl
Using kubectl
On any machine with kubectl access to the cluster:Example:For a ClusterRoleBinding (no Example:
- Identify the violating RoleBindings / ClusterRoleBindings
- Delete each violating binding
ns= field from the previous output):ns= field):- Verification
system:anonymous or system:unauthenticated:Automation
Automation

