k8s-pivot

k8s-pivot is a skill for Claude Code, Codex from MingyiSecLab/Mingyi-Atlas. It costs 35 tokens per session (1,725 once invoked), scanned A, a copy of k8s-pivot, Apache-2.0.

A Kubernetes security playbook for examining a compromised container’s connection to its cluster. It covers service-account tokens, permissions, pod settings, host mounts, and the Kubernetes API.

In plain words
What is it for?
Use it to identify the cluster, inspect available permissions, review high-risk resources, and assess possible movement from a pod to broader Kubernetes access.
Why use it?
It helps security testers understand how access inside one container could expose other workloads or cluster resources.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to identify the cluster, inspect available permissions, review high-risk resources, and assess possible movement from a pod to broader Kubernetes access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mingyiseclab/mingyi-atlas/k8s-pivot
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 MingyiSecLab/Mingyi-Atlas --skill k8s-pivot
Clone the repo
git clone --depth 1 https://github.com/MingyiSecLab/Mingyi-Atlas

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-pivot

README.md
[![agentmods](https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/k8s-pivot/github.svg)](https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/k8s-pivot)
Your own site
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/k8s-pivot"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/k8s-pivot/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 k8s-pivot

Your own site · 80×15
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/k8s-pivot"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/k8s-pivot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,725 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% 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.00035 $0.01725
Opus 5 $0.00017 $0.00863
Sonnet 5 $0.00007 $0.00345
Haiku 4.5 $0.00003 $0.00172

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

Security

Grade A, and why

k8s-pivot 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 11d 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.

Origin

This is a copy

94% identical to k8s-pivot — 7 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.

src/skills/standard/cloud/k8s-pivot/SKILL.md · 162 lines

How it starts

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

Kubernetes Pivot

1. Identify the cluster you're in

Inside a compromised pod:

# Service account token (default mount)
cat /var/run/secrets/kubernetes.io/serviceaccount/token > /tmp/sa.tok
cat /var/run/secrets/kubernetes.io/serviceaccount/namespace
cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt > /tmp/ca.crt

# API server address
echo $KUBERNETES_SERVICE_HOST $KUBERNETES_SERVICE_PORT_HTTPS
# Or: env | grep KUBE

2. Inventory permissions

KUBECTL="kubectl --token=$(cat /tmp/sa.tok) --certificate-authority=/tmp/ca.crt \
         --server=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT_HTTPS"

# What can I do in my own namespace?
$KUBECTL auth can-i --list --namespace=$(cat .../namespace) > /tmp/can_ns.txt

# Cluster-wide?
$KUBECTL auth can-i --list > /tmp/can_cluster.txt

# Specifically check the high-value verbs
for verb in get list create delete patch update; do
  for res in secrets pods deployments daemonsets nodes clusterroles rolebindings serviceaccounts; do
    $KUBECTL auth can-i $verb $res --all-namespaces 2>/dev/null | \
      grep -q yes && echo "$verb $res YES"
  done
done > /tmp/verbs.txt

Atlas ingest:

k8s_audit("/tmp/can_cluster.txt")

3. RBAC escalation primitives

Verb + Resource What it enables
create pods Create a pod with mount of host root, then RCE on node
get secrets Steal SA tokens, k8s API creds, dockercfg, TLS keys
create serviceaccounts.tokens Mint a new SA token w/ chosen TTL
update/patch clusterrolebindings Bind self to cluster-admin
impersonate Act as any user / SA
create pods/exec Exec into running pod → steal its token
bind / escalate (on Role/ClusterRole) Grant any permission
create persistentvolumes (cluster-wide) hostPath PV → read host fs
create podsecuritypolicies (old K8s) Author own permissive PSP
create validatingwebhookconfigurations Intercept apiserver requests
create mutatingwebhookconfigurations Modify any object on admission
update nodes/status (rare) Spoof node taints, evict pods

Read the full file on GitHub · 162 lines

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. 11d ago First seen · 162 lines · 35 tokens per session scan A b7f71ea96605

Subscribe to this mod's changes

k8s-pivot is a skill published in the GitHub repository MingyiSecLab/Mingyi-Atlas (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,725 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to k8s-pivot, differing in 7 lines, and is treated as a copy.