Logotipo de Auditing Container Image Build Hardening

Auditing Container Image Build Hardening

Organización
UnboundCompute
auditing-container-image-build-hardening

Audita las definiciones de compilación de imágenes de contenedor (Dockerfile, containerfile y la configuración de compose o run que establece las opciones de ejecución) para detectar imágenes que se distribuyen con privilegios excesivos o con secretos, teniendo en cuenta las etapas descartadas de compilaciones multifase y las sustituciones en el momento del despliegue. Abarca imágenes que se ejecutan como root, secretos incrustados en una capa, contenido remoto descargado sin fijar ni verificar, imágenes base mutables o sin etiqueta, instrucciones copy demasiado amplias que incorporan secretos locales e historial, y solicitudes de ejecución peligrosas, como el modo privilegiado o el montaje de un host sensible. Úsalo al revisar la capa de compilación de la imagen, no el contexto de seguridad del despliegue ni la definición del recurso en la nube. La definición de compilación es el origen; la imagen distribuida o la configuración de ejecución, el destino; y que un privilegio o secreto persista en la imagen final, el fallo.

Descripción general

EditorUnboundCompute
Repositoriosecurity-agent-skills
Nombre de la habilidadauditing-container-image-build-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 Container Image Build 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-container-image-build-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-container-image-build-hardening .claude/skills/auditing-container-image-build-hardening
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Auditing Container Image Build 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 Container Image Build 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 Container Image Build 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 container image build hardening: what survives into the shipped image

A secret used in a build stage that a multi-stage build discards is not in the shipped image, and a root Dockerfile deployed under a non-root security context does not run as root. So the bug here is not an instruction in isolation; it is what survives into the final image layer and the runtime request that ships with it. This audit reads the build definition and asks, per concern, whether the image that ships runs unprivileged, carries no secret in any layer, pulls only pinned and verified content, and requests no dangerous runtime privilege. The checklist competitors flag the instruction; the finding that survives is the one a later build stage or a deploy-time override does not neutralize. Stay on the image build plane, and hand deploy-time privilege to the Kubernetes skill and cloud resources to the infrastructure skill.

When to use

  • You have a Dockerfile or containerfile, or a compose or run config that sets container runtime flags.
  • An instruction sets the user, copies files, fetches remote content, pins a base, or requests a privilege.
  • You want to know what survives into the shipped image, not which instruction looks wrong in isolation.

Scope check

Audit only build definitions for images you own or are authorized to assess, and never push or run a built image to test a finding against shared infrastructure, adjudicate on the layers and the config. If you can't name the authorization, stop.

The loop

  1. Trace what reaches the final stage first. Follow the build stages and note what the shipping stage actually contains: which stage the final image is built from, what a copy-from carries forward, and which runtime fields come from the deploy manifest rather than the build. A secret or a root default only matters if it survives into the shipped image or is not overridden at deploy; settle that first.

  2. Check the run-as user. Look for no user directive, or a user set to root, so the final image defaults to the root account, then check whether the deploy-time security context or a non-root user in the base image overrides it. This is the image default; the Kubernetes skill owns the deploy-time context.

  3. Check for a baked secret. Look for an environment or build argument carrying a token or password, a copy of a key, credentials, or an environment file, or a secret used in a run step that persists in that layer, then confirm the final stage carries it rather than a multi-stage build discarding it. Report only a secret present in the shipped layers; hand its liveness and blast-radius to the secret-reachability skill.

  4. Check remote content and the base pin. Look for remote content fetched at build with no checksum or digest verification (a fetch-and-run, an add from a URL), and a base image on a mutable or untagged reference rather than a digest, then check whether a later step verifies the content or the deployment re-pins the image by digest.

  5. Check the copy scope and runtime request. Look for an over-broad copy of the whole context with no ignore file, pulling in version-control history, local secrets, and build junk, and for a compose or run config requesting privileged mode, added capabilities, or a sensitive host mount. Resolve the host-mount and capability overlap by layer: the build or compose config is this skill, the pod spec is the Kubernetes skill.

  6. Confirm and record. Confirm by showing the concern survives into the shipped image or the production run config. Kill the lead if a root default is overridden by a deploy-time non-root security context or a non-root base user, if a secret lives only in a discarded build stage the final copy-from does not carry, if remote content is verified by digest or checksum later, if a mutable tag is re-pinned by digest at deployment, if an over-broad copy is neutralized by an ignore file that excludes the sensitive paths, or if a privileged or host-mount request is confined to a local-development config not the production manifest. Record the instruction, what survives into the image, and the layer that carries it.

Where container builds leak

  • The finding is what survives, not the instruction. A discarded build stage or a deploy-time override can neutralize it; adjudicate the shipped image, not the line.
  • A root Dockerfile can be fixed at deploy. A non-root security context in the manifest overrides the image default; check the runtime layer before calling a missing user a finding.
  • A multi-stage build discards intermediate secrets. A secret in a build stage the final copy-from does not carry never ships; the final stage is what matters.
  • A mutable tag can be re-pinned downstream. A latest or untagged base is a drift and integrity risk unless the deployment re-pins by digest; check where the image is actually resolved.
  • An over-broad copy is only a leak without an ignore file. A copy of the whole context is neutralized when an ignore file excludes version control, secrets, and junk.

Worked example (a confirm and a kill)

Confirm. The final build stage sets a build argument holding an API key into an environment variable, and no deploy override removes it, so the shipped image layer exposes a live key in its history. A pull of the image reveals the key. Confirmed a secret baked into the shipped image layer, high rising with the key's privilege, remediation = pass the secret at runtime from a secret store, never bake it into a layer, and rotate the exposed key.

Kill. A key is set in a build stage, but the final stage is built from a separate base and the copy-from carries only the compiled artifact, not the key, so the shipped image has no secret layer. Killed, kill_reason = "the secret lives only in a discarded build stage; the final copy-from does not carry it, so it is not in the shipped image."

Rationalizations to reject

  • "The image has no user directive, so it runs as root." -> Does the deploy security context or the base image set a non-root user? The image default can be overridden at runtime.
  • "There is a secret in a build argument." -> Does the final stage carry it, or does a multi-stage build discard it? Only a secret in the shipped layers is the finding.
  • "The base is on the latest tag." -> Does the deployment re-pin by digest? A mutable tag re-pinned at deploy is resolved to a fixed image.
  • "It copies the whole build context." -> Is there an ignore file excluding secrets and version control? A scoped ignore neutralizes an over-broad copy.
  • "The config requests privileged mode." -> Is that the production manifest or a local-development compose file? A dev-only privilege request is not what ships.

Executing this in practice

You need the build definition and its stages, what the final stage is built from and what a copy-from carries, the deploy-time fields that override image defaults, the remote-content fetches and base pins, the copy scope and any ignore file, and the production run config. For each concern, decide what survives into the shipped image or the production runtime. Reading the instruction tells you what the build does; tracing the final stage and the deploy overrides tells you what actually ships.

Related

  • auditing-kubernetes-workload-and-rbac-hardening - the mutual FP-killer: a root image here is killed by a locked-down deploy-time security context there, and that context is aggravated by a root image here.
  • auditing-infrastructure-as-code-exposures - the sibling for cloud provider resource state; distinct from the image build plane this skill audits.
  • hunting-non-human-identity-and-secret-reachability - takes the liveness and blast-radius of a secret this skill finds baked into an image layer.
  • FINDING-SCHEMA.md - source = the build definition, sink = the shipped image or run config, evidence = the privilege or secret that survives into the final image layer.

Preguntas frecuentes

¿Qué hace la habilidad de IA Auditing Container Image Build Hardening?

Audita las definiciones de compilación de imágenes de contenedor (Dockerfile, containerfile y la configuración de compose o run que establece las opciones de ejecución) para detectar imágenes que se distribuyen con privilegios excesivos o con secretos, teniendo en cuenta las etapas descartadas de compilaciones multifase y las sustituciones en el momento del despliegue. Abarca imágenes que se ejecutan como root, secretos incrustados en una capa, contenido remoto descargado sin fijar ni verificar, imágenes base mutables o sin etiqueta, instrucciones copy demasiado amplias que incorporan secre...

¿Por qué usar Auditing Container Image Build Hardening en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Auditing Container Image Build 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 Container Image Build Hardening en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-container-image-build-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 Container Image Build 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 Container Image Build Hardening?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Auditing Container Image Build 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 Container Image Build 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 👇