Skip to main content

More Info:

Verifies no (Cluster)RoleBinding targets system:anonymous or system:unauthenticated. Such bindings grant access to unauthenticated callers.

Risk Level

Critical

Address

Security

Compliance Standards

  • Cloudanix Best Practice

Triage and Remediation

Remediation

Manual Steps

  1. Review current violating bindings (any machine with kubectl access):
  2. For each offending RoleBinding, inspect details and confirm it is safe to remove (any machine with kubectl access):
  3. Delete offending RoleBindings that reference system:anonymous or system:unauthenticated (any machine with kubectl access):
  4. 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:
  5. If bindings are managed via manifests or GitOps, update the source manifests to remove any subjects named system:anonymous or system:unauthenticated so they are not re-applied (edit locally, then apply from any machine with kubectl access):
  6. Verification (any machine with kubectl access):
    The command should output only:
On any machine with kubectl access to the cluster:
  1. Identify the violating RoleBindings / ClusterRoleBindings
  1. Delete each violating binding
For a namespaced RoleBinding (note the ns= field from the previous output):
Example:
For a ClusterRoleBinding (no ns= field):
Example:
  1. Verification
Re-run the audit to confirm no bindings reference system:anonymous or system:unauthenticated: