Logotipo de Auditing Kubernetes Workload And Rbac Hardening

Auditing Kubernetes Workload And Rbac Hardening

Organización
UnboundCompute
auditing-kubernetes-workload-and-rbac-hardening

Audita los manifiestos de Kubernetes para detectar una identidad a la que se conceden más permisos de los necesarios o una carga de trabajo que puede escapar de su contenedor, una vez resueltos el grafo de vinculaciones y la política de admisión. Abarca un RoleBinding o ClusterRoleBinding asociado a cluster-admin o a un rol con verbos comodín; un pod que se ejecuta con privilegios o con espacios de nombres del host, o que monta una ruta hostPath sensible; un contenedor que se ejecuta como root o puede escalar privilegios; capacidades añadidas peligrosas; un token de cuenta de servicio montado aunque la carga de trabajo no necesite acceder a la API; y una carga de trabajo sin ninguna política de red. Úsalo al revisar la capa YAML de Kubernetes (roles, vinculaciones y contextos de seguridad de las cargas de trabajo tal como están declarados), no el grafo de identidades en la nube ni la compilación de la imagen. El manifiesto es el origen; una identidad con cluster-admin o una carga de trabajo que escapa, el destino; y el fallo consiste en conceder un permiso o privilegio que el grafo de vinculaciones y la política de admisión permiten realmente.

Descripción general

EditorUnboundCompute
Repositoriosecurity-agent-skills
Nombre de la habilidadauditing-kubernetes-workload-and-rbac-hardening
Estrellas
27
Forks
8
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por UnboundCompute en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Auditing Kubernetes Workload And Rbac Hardening en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-kubernetes-workload-and-rbac-hardening
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Auditing Kubernetes Workload And Rbac Hardening en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Auditing Kubernetes Workload And Rbac Hardening automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Auditing Kubernetes Workload And Rbac Hardening no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Preguntas frecuentes

¿Qué hace la habilidad de IA Auditing Kubernetes Workload And Rbac Hardening?

Audita los manifiestos de Kubernetes para detectar una identidad a la que se conceden más permisos de los necesarios o una carga de trabajo que puede escapar de su contenedor, una vez resueltos el grafo de vinculaciones y la política de admisión. Abarca un RoleBinding o ClusterRoleBinding asociado a cluster-admin o a un rol con verbos comodín; un pod que se ejecuta con privilegios o con espacios de nombres del host, o que monta una ruta hostPath sensible; un contenedor que se ejecuta como root o puede escalar privilegios; capacidades añadidas peligrosas; un token de cuenta de servicio monta...

¿Por qué usar Auditing Kubernetes Workload And Rbac Hardening en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Auditing Kubernetes Workload And Rbac Hardening está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Auditing Kubernetes Workload And Rbac Hardening en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-kubernetes-workload-and-rbac-hardening. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Auditing Kubernetes Workload And Rbac Hardening?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Auditing Kubernetes Workload And Rbac Hardening?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Auditing Kubernetes Workload And Rbac Hardening con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Auditing Kubernetes Workload And Rbac Hardening?

Sí. UnboundCompute la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇