auditing-kubernetes-cluster-rbac

auditing-kubernetes-cluster-rbac is a skill for Claude Code from 26zl/cybersec-toolkit. It costs 56 tokens per session (3,071 once invoked), scanned B, a copy of auditing-kubernetes-cluster-rbac, MIT.

A security review guide for Kubernetes RBAC, the system that controls which users and services can perform actions in a cluster. It identifies permissions that are broader than necessary or could enable privilege escalation.

In plain words
What is it for?
Reviewing Roles, ClusterRoles, and bindings; finding wildcard permissions; investigating access risks; and documenting cluster access controls.
Why use it?
It helps prevent users and service accounts from gaining access to workloads or cluster functions they do not need.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the cybersec-toolkit plugin — 197 skills, 2 hooks, 1 MCP server shipped together

Good fit Reviewing Roles, ClusterRoles, and bindings; finding wildcard permissions; investigating access risks; and documenting cluster access controls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 26zl/cybersec-toolkit --skill auditing-kubernetes-cluster-rbac
Clone the repo
git clone --depth 1 https://github.com/26zl/cybersec-toolkit

Made for: Claude Code.

Or install cybersec-toolkit, the plugin that ships this one along with the rest of its 197 skills, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auditing-kubernetes-cluster-rbac

README.md
[![agentmods](https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac/github.svg)](https://agentmods.dev/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac)
Your own site
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auditing-kubernetes-cluster-rbac

Your own site · 80×15
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/auditing-kubernetes-cluster-rbac.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.03071
Opus 5 $0.00028 $0.01536
Sonnet 5 $0.00011 $0.00614
Haiku 4.5 $0.00006 $0.00307

Measured 7d ago against content hash e134fc31dcd4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

auditing-kubernetes-cluster-rbac scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

kubeaudit all --kubeconfig ~/.kube/config

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Origin

This is a copy

91% identical to auditing-kubernetes-cluster-rbac — 21 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/auditing-kubernetes-cluster-rbac/SKILL.md · 332 lines

How it starts

The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auditing Kubernetes Cluster RBAC

When to Use

  • When performing security assessments of Kubernetes clusters (EKS, GKE, AKS, or self-managed)
  • When validating that RBAC policies enforce least privilege for users and service accounts
  • When investigating potential lateral movement or privilege escalation within a Kubernetes cluster
  • When compliance audits require documentation of access controls and permissions
  • When onboarding new teams to a shared cluster and defining appropriate RBAC policies

Do not use for network policy auditing (use Cilium or Calico network policy tools), for container image scanning (use Trivy or Grype), or for runtime security monitoring (use Falco or Sysdig Secure).

Prerequisites

  • kubectl configured with cluster-admin or equivalent read permissions to the target cluster
  • rbac-tool installed (kubectl krew install rbac-tool or binary from GitHub)
  • KubiScan installed (pip install kubiscan)
  • Kubeaudit installed (brew install kubeaudit or from GitHub releases)
  • Access to the cluster's audit logs for correlating RBAC findings with actual API access

Workflow

Step 1: Enumerate ClusterRoles and Roles with Dangerous Permissions

Identify roles with wildcard permissions, secret access, pod exec, or escalation capabilities.

# List all ClusterRoles with wildcard verb access
kubectl get clusterroles -o json | python3 -c "
import json, sys
data = json.load(sys.stdin)
for role in data['items']:
    name = role['metadata']['name']
    for rule in role.get('rules', []):
        verbs = rule.get('verbs', [])
        resources = rule.get('resources', [])
        if '*' in verbs or '*' in resources:
            print(f'ClusterRole: {name}')
            print(f'  Verbs: {verbs}')
            print(f'  Resources: {resources}')
            print(f'  API Groups: {rule.get(\"apiGroups\", [])}')
            print()
"

# Find roles that can read secrets
kubectl get clusterroles -o json | python3 -c "
import json, sys
data = json.load(sys.stdin)
for role in data['items']:
    name = role['metadata']['name']
    for rule in role.get('rules', []):
        resources = rule.get('resources', [])
        verbs = rule.get('verbs', [])
        if ('secrets' in resources or '*' in resources) and ('get' in verbs or 'list' in verbs or '*' in verbs):
            if not name.startswith('system:'):
                print(f'ClusterRole: {name} -> can access secrets (verbs: {verbs})')
"

# Find roles with pod/exec permissions (container escape risk)
kubectl get clusterroles -o json | python3 -c "
import json, sys
data = json.load(sys.stdin)
for role in data['items']:
    name = role['metadata']['name']
    for rule in role.get('rules', []):
        resources = rule.get('resources', [])
        if 'pods/exec' in resources or 'pods/*' in resources:
            print(f'ClusterRole: {name} -> has pods/exec access')
"

Read the full file on GitHub · 332 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 332 lines · 56 tokens per session scan B e134fc31dcd4

Subscribe to this mod's changes

auditing-kubernetes-cluster-rbac is a skill published in the GitHub repository 26zl/cybersec-toolkit (54 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 3,071 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reaches for credential files). It is 91% identical to auditing-kubernetes-cluster-rbac, differing in 21 lines, and is treated as a copy.

Related

Other skills, from other repositories

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

xalgorix/xalgorix · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

Youngmaidainon/Agent-Level-Up · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

RobotFlow-Labs/skills-repo · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

autohandai/community-skills · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

Njones17/AI-agent-master-cyber-skills-list · 56 tokens

securing-kubernetes-on-cloud

This skill covers hardening managed Kubernetes clusters on EKS, AKS, and GKE by implementing Pod Security Standards, network policies, workload identity, RBAC scoping, image admission controls, and runtime security monitoring. It addresses cloud-specific security features including IRSA for EKS, Workload Identity for…

xalgorix/xalgorix · 80 tokens