Auditing Kubernetes Workload And Rbac Hardeningのロゴ

Auditing Kubernetes Workload And Rbac Hardening

組織
UnboundCompute
auditing-kubernetes-workload-and-rbac-hardening

Kubernetesマニフェストを監査し、バインディンググラフとアドミッションポリシーを確認したうえで、必要以上の権限を付与された主体やコンテナから脱出できるワークロードがないか調べます。cluster-adminまたはワイルドカードの動詞を持つロールをRoleBindingやClusterRoleBindingで割り当てるケース、特権モードで実行されるPod、ホスト名前空間を使用するPod、または機密性の高いhostPathをマウントするPod、rootとして実行されるか権限昇格が可能なコンテナ、危険な追加ケイパビリティ、ワークロードにAPIアクセスが不要なのにマウントされるサービスアカウントトークン、ネットワークポリシーがなく無防備なワークロードが対象です。クラウドIDグラフやイメージのビルドではなく、宣言されたKubernetes YAMLの領域(ロール、バインディング、ワークロードのセキュリティコンテキスト)をレビューする場合に使用してください。マニフェストがソースで、cluster-adminの主体またはコンテナから脱出できるワークロードがシンクです。バインディンググラフとアドミッションで実際に許可される権限や特権が脆弱性です。

概要

公開者UnboundCompute
リポジトリsecurity-agent-skills
スキル名auditing-kubernetes-workload-and-rbac-hardening
スター
27
フォーク
8
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    UnboundComputeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Auditing Kubernetes Workload And Rbac Hardening」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-kubernetes-workload-and-rbac-hardening
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-kubernetes-workload-and-rbac-hardening .claude/skills/auditing-kubernetes-workload-and-rbac-hardening
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAuditing Kubernetes Workload And Rbac Hardeningを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAuditing Kubernetes Workload And Rbac Hardeningを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Auditing Kubernetes Workload And Rbac Hardeningは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Auditing Kubernetes workload and RBAC hardening: what the binding graph and admission actually allow

A wildcard ClusterRole that nothing binds grants nobody anything, and a privileged pod that admission rejects never deploys. That is why this audit is not a scan of role verbs and pod fields; it is a resolution of the binding graph (which subject is actually granted a role) and the admission layer (whether the workload can deploy as written). The competitors flag a wildcard role or a root container in isolation; the finding that survives is the one where a binding grants the power to a workload that can use it, and admission does not stop it. You audit the manifests by resolving those two layers and asking, per subject and per workload, whether it holds more than it needs and can act on it. Stay on the Kubernetes YAML plane, not the cloud IAM graph and not the image build.

When to use

  • You have Kubernetes manifests: roles and bindings, pod and workload specs, service accounts, network policies.
  • A binding references cluster-admin or a wildcard role, or a pod sets a privileged or host-level security context.
  • You want to know which grants and privileges the binding graph and admission actually allow, not which appear.

Scope check

Audit only manifests for clusters you own or are authorized to assess, and never apply a manifest or exercise a binding against a live cluster to test a finding, adjudicate on the resolved graph. If you can't name the authorization, stop.

The loop

  1. Resolve the binding graph and admission first. For each Role and ClusterRole, find the bindings that reference it and the subjects they grant it to (a named service account, a broad group, an authenticated-users binding), and determine what pod-security admission level or admission policy the target namespace enforces. A role is only a grant through a binding, and a workload is only deployable if admission allows it; settle both before flagging.

  2. Check over-granted bindings. Look for a RoleBinding or ClusterRoleBinding to cluster-admin, or to a role with wildcard verbs, resources, or API groups, and note how broad the bound subject is. A wildcard role bound to a default service account that pods mount is far worse than one bound to nothing.

  3. Check escape-primitive workloads. Look for a pod set privileged, sharing the host process, IPC, or network namespace, or mounting a sensitive host path (the root filesystem, the container runtime socket, host config, the kubelet directory). Each is a container-escape primitive if admission permits it.

  4. Check the container security context. Look for run-as-non-root absent or false, run-as-user zero, privilege escalation not disabled, a writable root filesystem where read-only is warranted, and dangerous added capabilities or a failure to drop all capabilities. This is the deploy-time context; where it overlaps the image default, this skill owns the security context and hands the image to the container-image skill.

  5. Check token exposure and network reach. Look for a service-account token automounted on a pod or account that does not call the API, a secret supplied as a literal environment value rather than a reference, and a workload selected by no network policy in a cluster without a default-deny. Also flag RBAC verbs that are escalation primitives themselves (escalate, bind, impersonate, create pods, read secrets) when granted where they enable lateral gain.

  6. Confirm and record. Confirm by tracing a binding to a subject a reachable workload uses, or a security context admission would admit. Kill the lead if a wildcard role has no binding or binds only an unused subject, if pod-security admission or an admission policy would reject the privileged or hostPath pod as written, if a root context is overridden by a namespace or cluster default or the image already drops to non-root, if an automounted token belongs to an account bound to no meaningful RBAC, if a missing network policy is covered by a namespace-wide default-deny or the CNI, or if a secret in the environment is a reference rather than a plaintext value. Record the subject or workload, the resolved grant or privilege, and the admission verdict.

Where Kubernetes manifests leak

  • The role is not the grant; the binding is. A wildcard ClusterRole that nothing references grants nobody; resolve the binding graph before calling a role a finding.
  • Admission can make a manifest undeployable. A privileged or hostPath pod that pod-security admission rejects never runs as written; the admission level is part of the finding.
  • A root context can be overridden downstream. A namespace default security context or a non-root image user can override a root pod field; check the effective context, not the field alone.
  • A token grants only what its account is bound to. An automounted service-account token on an account with no meaningful RBAC is not an exposure; the binding decides.
  • Some RBAC verbs are escalation primitives. Escalate, bind, impersonate, create-pods, and read-secrets let a subject climb; a narrow-looking role holding one of these can still reach cluster-admin.

Worked example (a confirm and a kill)

Confirm. A ClusterRoleBinding binds the default service account of a namespace to cluster-admin, and pods in that namespace automount that account's token; a workload there is reachable and admission does not strip the token. A compromise of that pod is cluster-admin. Confirmed cluster-admin granted to a mounted default service account, critical, remediation = remove the binding, give the workload a dedicated least-privilege account, and disable token automount where the API is not used.

Kill. A pod spec sets privileged true and mounts a host path, but the target namespace enforces the restricted pod-security standard, which rejects both, so the manifest cannot deploy as written. Killed, kill_reason = "the privileged, hostPath pod is rejected by the namespace's restricted pod-security admission, so it cannot be admitted."

Rationalizations to reject

  • "There is a wildcard ClusterRole." -> Does any binding grant it, and to whom? An unbound wildcard role grants nobody; resolve the binding graph first.
  • "The pod runs privileged." -> Would admission admit it? A restricted or baseline pod-security policy rejects it, and the manifest never deploys as written.
  • "The container runs as root." -> Is the context overridden by a namespace default or the image's non-root user? Check the effective security context before flagging.
  • "The service-account token is automounted." -> Is the account bound to anything meaningful? A mounted token that grants nothing is not an exposure.
  • "There is no network policy." -> Is there a namespace default-deny or a CNI that isolates it? A missing policy is only flat if nothing else segments the workload.

Executing this in practice

You need the roles and bindings, the workload specs and their security contexts, the service accounts and their token settings, the network policies, and the pod-security admission level or admission policy per namespace. For each subject, resolve the binding graph; for each workload, resolve the admission verdict; then decide whether the grant or privilege is more than needed and usable. Reading the manifest tells you what it declares; resolving the bindings and admission tells you what the cluster would actually allow.

Related

  • auditing-infrastructure-as-code-exposures - the sibling for cloud provider resources; this skill owns the Kubernetes YAML plane, that one owns buckets, network rules, and identity policies.
  • auditing-container-image-build-hardening - the mutual FP-killer: a root image is killed by a locked-down security context here, and a permissive context here is aggravated by a root image there.
  • hunting-iam-privilege-escalation-paths - the cloud identity graph that sits beneath the cluster; distinct from the in-cluster RBAC binding graph this skill resolves.
  • FINDING-SCHEMA.md - source = the manifest, sink = a cluster-admin subject or an escaping workload, evidence = the resolved binding graph and the admission verdict.

よくある質問

AIスキル「Auditing Kubernetes Workload And Rbac Hardening」では何ができますか?

Kubernetesマニフェストを監査し、バインディンググラフとアドミッションポリシーを確認したうえで、必要以上の権限を付与された主体やコンテナから脱出できるワークロードがないか調べます。cluster-adminまたはワイルドカードの動詞を持つロールをRoleBindingやClusterRoleBindingで割り当てるケース、特権モードで実行されるPod、ホスト名前空間を使用するPod、または機密性の高いhostPathをマウントするPod、rootとして実行されるか権限昇格が可能なコンテナ、危険な追加ケイパビリティ、ワークロードにAPIアクセスが不要なのにマウントされるサービスアカウントトークン、ネットワークポリシーがなく無防備なワークロードが対象です。クラウドIDグラフやイメージのビルドではなく、宣言されたKubernetes YAMLの領域(ロール、バインディング、ワークロードのセキュリティコンテキスト)をレビューする場合に使用してください。マニフェストがソースで、cluster-adminの主体またはコンテナから脱出できるワークロードがシンクです。バインディンググラフとアドミッションで実際に許可される権限や特権が脆弱性です。

TypingMindでAuditing Kubernetes Workload And Rbac Hardeningを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Auditing Kubernetes Workload And Rbac Hardeningはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAuditing Kubernetes Workload And Rbac Hardeningをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-kubernetes-workload-and-rbac-hardeningを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Auditing Kubernetes Workload And Rbac Hardeningを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Auditing Kubernetes Workload And Rbac Hardeningで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAuditing Kubernetes Workload And Rbac Hardeningを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Auditing Kubernetes Workload And Rbac Hardening」は無料ですか?

はい。UnboundComputeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇