Логотип Auditing Container Image Build Hardening

Auditing Container Image Build Hardening

Організація
UnboundCompute
auditing-container-image-build-hardening

Перевіряйте визначення збірки образів контейнерів (Dockerfile, containerfile, а також конфігурацію compose або запуску, де задаються параметри середовища виконання), щоб виявити надмірні привілеї або секрети в образі з урахуванням вилучень на етапах багатоступеневої збірки та перевизначень під час розгортання. Перевіряйте, чи запускається образ від root; чи не вбудовано секрет у шар; чи не завантажується віддалений вміст без фіксації версії або перевірки; чи не використовується змінний образ-основа або образ без тегу; чи не копіюються зайві локальні секрети й історія; чи немає небезпечних запитів під час запуску, як-от привілейованого режиму або монтування чутливого каталогу хоста. Використовуйте цю навичку, перевіряючи середовище збірки образу, а не контекст безпеки під час розгортання чи визначення хмарного ресурсу. Джерело — визначення збірки, ціль — опублікований образ або конфігурація запуску; вразливість — привілей або секрет, що зберігся в кінцевому образі.

Огляд

ВидавецьUnboundCompute
Репозиторійsecurity-agent-skills
Назва навичкиauditing-container-image-build-hardening
Зірки
27
Форки
8
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: UnboundCompute. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Auditing Container Image Build Hardening у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-container-image-build-hardening
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Auditing Container Image Build Hardening в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Auditing Container Image Build Hardening, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Auditing Container Image Build Hardening не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

Поширені запитання

Що робить навичка ШІ Auditing Container Image Build Hardening?

Перевіряйте визначення збірки образів контейнерів (Dockerfile, containerfile, а також конфігурацію compose або запуску, де задаються параметри середовища виконання), щоб виявити надмірні привілеї або секрети в образі з урахуванням вилучень на етапах багатоступеневої збірки та перевизначень під час розгортання. Перевіряйте, чи запускається образ від root; чи не вбудовано секрет у шар; чи не завантажується віддалений вміст без фіксації версії або перевірки; чи не використовується змінний образ-основа або образ без тегу; чи не копіюються зайві локальні секрети й історія; чи немає небезпечних з...

Навіщо використовувати Auditing Container Image Build Hardening у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Auditing Container Image Build Hardening — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Auditing Container Image Build Hardening у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-container-image-build-hardening. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Auditing Container Image Build Hardening?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Auditing Container Image Build Hardening?

Зі скількома забажаєте. У TypingMind ви можете використовувати Auditing Container Image Build Hardening із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Auditing Container Image Build Hardening?

Так. На GitHub цю навичку публікує UnboundCompute за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇