k8s-security

k8s-security is a skill for Claude Code, Codex from yindia/rootcause. It costs 0 tokens per session (2,253 once invoked), scanned A, original, MIT.

A Kubernetes security diagnostic and audit guide for access, secrets, policies, workload settings, and network isolation. Kubernetes is a system for running containerized applications.

In plain words
What is it for?
Use it to review RBAC, service accounts, IRSA, secrets, ConfigMaps, Kyverno and Cilium policies, network rules, and workload security practices.
Why use it?
It helps identify excessive permissions, broken identity links, invalid configuration references, policy violations, and unsafe network paths.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/yindia/rootcause/k8s-security
Any agent
npx skills add yindia/rootcause --skill k8s-security
Clone the repo
git clone --depth 1 https://github.com/yindia/rootcause

Made for: Claude Code, Codex.

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 k8s-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/yindia/rootcause/k8s-security.svg)](https://agentmods.dev/skills/yindia/rootcause/k8s-security)
Your own site
<a href="https://agentmods.dev/skills/yindia/rootcause/k8s-security"><img src="https://agentmods.dev/badge/skills/yindia/rootcause/k8s-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00000 $0.02253
Opus 5 $0.00000 $0.01126
Sonnet 5 $0.00000 $0.00451
Haiku 4.5 $0.00000 $0.00225

Measured 4d ago against content hash d3b51852f333, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

k8s-security scanned grade A with 0 findings 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 4d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude/k8s-security/SKILL.md · 272 lines

How it starts

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

Skill: k8s-security

Security diagnostics and audit guidance for Kubernetes workloads using RootCause MCP tools only.

Scope

  • RBAC posture and dangerous grants.
  • ServiceAccount and IRSA trust-chain analysis.
  • Secret and ConfigMap reference validation.
  • Policy compliance checks with Kyverno and Cilium context.
  • Workload security best-practice review.
  • Network isolation and policy-path diagnostics.

Tooling Rule

  • Use RootCause tool names only.
  • Use k8s.list for resource enumeration (including ClusterRoleBinding and RoleBinding queries).
  • Use k8s.describe for object-level condition/event detail.
  • Do not use non-RootCause tool name variants.

Canonical Tool Set

Primary security tools

  • k8s.permission_debug
  • k8s.config_debug
  • k8s.best_practice
  • k8s.kyverno_detect
  • k8s.diagnose_kyverno
  • k8s.cilium_detect
  • k8s.diagnose_cilium
  • k8s.describe
  • k8s.list
  • k8s.network_debug
  • aws.iam.get_role
  • aws.iam.get_policy

Supporting event evidence

  • k8s.events
  • k8s.events_timeline

Triggers

  • rbac denied
  • forbidden
  • who can access
  • cluster-admin usage
  • wildcard verbs
  • secret exfiltration risk
  • pod exec abuse
  • serviceaccount hardening
  • irsa not working
  • sts assume role error
  • kyverno policy violation
  • cilium deny
  • network isolation drift
  • compliance audit
  • pod security posture

Priority Rules

Condition First action Why
Unknown policy stack Run k8s.kyverno_detect and k8s.cilium_detect Scope policy engines before deep triage
Permission error in app logs Run k8s.permission_debug Resolves RBAC and IRSA quickly
IRSA suspect Run k8s.permission_debug then aws.iam.get_role Validates K8s and IAM chain
Config/secret runtime failure Run k8s.config_debug Detects missing keys and references
Admission denied Run k8s.diagnose_kyverno Surfaces policy and report failures
Network deny suspicion Run k8s.network_debug then k8s.diagnose_cilium Covers K8s policy + Cilium datapath
Broad security review Run k8s.best_practice Produces security-focused workload findings

Read the full file on GitHub · 272 lines

Files

What ships with it

1 file 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. 4d ago First seen · 272 lines · 0 tokens per session scan A d3b51852f333

Subscribe to this mod's changes

k8s-security is a skill published in the GitHub repository yindia/rootcause (42 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,253 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.