More Info:
ClusterRoleBindings or RoleBindings to the user system:anonymous grant permissions to unauthenticated callers. Such bindings should be removed or replaced with authenticated, least-privilege bindings.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On any machine with kubectl access, list all bindings to
system:anonymousand capture them for review: -
For each identified binding, inspect its full specification and permissions to understand what it allows and whether it is still needed. Replace the placeholder names with actual values from step 1:
-
Decide on safer access patterns based on your organization’s auth model. For each binding that must continue to exist in some form, choose or create an authenticated subject with least-privilege access (for example, a user-defined group like
my-anon-like-viewers) and ensure that group is actually used by your authentication system. Create such a group or user in your IdP or GKE IAM configuration as appropriate before proceeding. -
For each unsafe binding you will replace, create a new binding to the authenticated, least-privilege subject. Example (adjust names, namespace, and role according to your review):
-
After confirming the new bindings work for intended users or groups, delete the unsafe bindings to
system:anonymous. Replace names/namespaces with those found in step 1: -
Verification (on any machine with kubectl access): re-run the audit to confirm no bindings remain to
system:anonymous:
Using kubectl
Using kubectl
On any machine with kubectl access:Apply:RoleBinding example (namespace-scoped):Apply:
- List all bindings to
system:anonymous(for review)
- After deciding which bindings are unsafe and can be removed, delete them
- (Optional) Replace with least-privilege, authenticated bindings
my-authenticated-users to an appropriate Role/ClusterRole you have defined.ClusterRoleBinding example (cluster-wide):- Verification (same command as audit)
Automation
Automation

