Logo von Auditing Container Image Build Hardening

Auditing Container Image Build Hardening

Organisation
UnboundCompute
auditing-container-image-build-hardening

Prüfen Sie Definitionen für Container-Image-Builds (Dockerfile, containerfile sowie Compose- oder Run-Konfigurationen mit Laufzeit-Flags) darauf, ob ein Image mit übermäßigen Berechtigungen oder einem Secret ausgeliefert wird – auch unter Berücksichtigung verworfener Multi-Stage-Builds und Überschreibungen zur Bereitstellungszeit. Umfasst Images, die als root ausgeführt werden, in einer Layer eingebettete Secrets, nicht gepinnte oder verifizierte externe Inhalte, ein veränderliches oder nicht getaggtes Basisimage, zu weit gefasste Kopiervorgänge, die lokale Secrets und den Verlauf einschließen, sowie gefährliche Laufzeitanforderungen wie den privilegierten Modus oder das Einbinden eines sensiblen Host-Verzeichnisses. Verwenden Sie diesen Skill, wenn Sie die Image-Build-Ebene prüfen – nicht den Sicherheitskontext zur Bereitstellungszeit oder die Definition der Cloud-Ressource. Die Build-Definition ist die Quelle, das ausgelieferte Image oder die Run-Konfiguration das Ziel. Der Fehler besteht darin, dass Berechtigungen oder ein Secret im finalen Image erhalten bleiben.

Übersicht

HerausgeberUnboundCompute
Repositorysecurity-agent-skills
Skill-Nameauditing-container-image-build-hardening
Sterne
27
Forks
8
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von UnboundCompute auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Auditing Container Image Build Hardening in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-container-image-build-hardening
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

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
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Auditing Container Image Build Hardening in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Auditing Container Image Build Hardening automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Auditing Container Image Build Hardening nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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.

Häufig gestellte Fragen

Was macht der KI-Skill Auditing Container Image Build Hardening?

Prüfen Sie Definitionen für Container-Image-Builds (Dockerfile, containerfile sowie Compose- oder Run-Konfigurationen mit Laufzeit-Flags) darauf, ob ein Image mit übermäßigen Berechtigungen oder einem Secret ausgeliefert wird – auch unter Berücksichtigung verworfener Multi-Stage-Builds und Überschreibungen zur Bereitstellungszeit. Umfasst Images, die als root ausgeführt werden, in einer Layer eingebettete Secrets, nicht gepinnte oder verifizierte externe Inhalte, ein veränderliches oder nicht getaggtes Basisimage, zu weit gefasste Kopiervorgänge, die lokale Secrets und den Verlauf einschlie...

Warum Auditing Container Image Build Hardening in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Auditing Container Image Build Hardening besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Auditing Container Image Build Hardening in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-container-image-build-hardening ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Auditing Container Image Build Hardening nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Auditing Container Image Build Hardening verwenden?

So viele Sie möchten. In TypingMind können Sie Auditing Container Image Build Hardening mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Auditing Container Image Build Hardening kostenlos?

Ja. Der Skill wird von UnboundCompute auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇