Agent skill

Implementing Container Image Minimal Base With Distroless

by mukul975 in mukul975/Anthropic-Cybersecurity-Skills

Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using…

Apache-2.0Auto-check passedDevOps & Cloud

Install Implementing Container Image Minimal Base With Distroless

skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-container-image-minimal-base-with-distroless -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Anthropic-Cybersecurity-Skills implementing-container-image-minimal-base-with-distroless --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/implementing-container-image-minimal-base-with-distroless .claude/skills/implementing-container-image-minimal-base-with-distroless && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
implementing-container-image-minimal-base-with-distroless
GitHub stars
34k
Token cost
~1.7k tokens
SKILL.md length
350 words
Files
8 (incl. scripts, references, assets)
Skills in repo
644
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using…

  • Hardening container images
  • SKILL.md covers Overview, When to Use, Prerequisites and Available Distroless Images, plus 5 more sections
  • Runs Python scripts from its folder; calls kubectl and trivy
  • Cutting attack surface in a container architecture

What it does

Implementing Container Image Minimal Base With Distroless is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using multi-stage build patterns plus debugging and scanning techniques adapted to distroless. Use when hardening container images, cutting attack surface in a container architecture, or answering an assessment finding about bloated base images. Keywords: distroless, multi-stage build, no shell, nonroot tag, debug image, scratch…

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/api-reference.md` and `references/standards.md`).

It sits in DevOps & Cloud, covering Containers and Threat modeling. It works with Docker, Trivy and Python. The repository describes itself as: 817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io…. The licence is Apache-2.0.

When your agent uses it

  • Hardening container images
  • Cutting attack surface in a container architecture
  • Answering an assessment finding about bloated base images
  • Scanning an image for known CVEs - use scanning-docker-images-with-trivy

Example prompts

  • “Use the implementing-container-image-minimal-base-with-distroless skill to reduce container attack surface by building application images on Google…”
  • “/implementing-container-image-minimal-base-with-distroless”

Requirements

  • Python 3
  • Node.js
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 54a7988. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • kubectl
    • trivy

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • docs.docker.com
    • medium.com
    • infoq.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Implementing Container Image Minimal Base With Distroless loads about 1.7k tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 169 tokens; SKILL.md has 350 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~169
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Anthropic-Cybersecurity-Skills at commit 54a7988, republished under its Apache-2.0 licence (© mukul975). 350 words, ~1,678 tokens.

Download SKILL.mdSave it as .claude/skills/implementing-container-image-minimal-base-with-distroless/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
implementing-container-image-minimal-base-with-distroless
description
Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using multi-stage build patterns plus debugging and scanning techniques adapted to distroless. Use when hardening container images, cutting attack surface in a container architecture, or answering an assessment finding about bloated base images. Keywords: distroless, multi-stage build, no shell, nonroot tag, debug image, scratch, attack surface. Do not use for scanning an image for known CVEs - use scanning-docker-images-with-trivy.
domain
cybersecurity
subdomain
container-security
tags
distroless, container-images, minimal-base, attack-surface, docker, security-hardening, supply-chain, kubernetes
version
1.0
author
mahipal
license
Apache-2.0
nist_csf
PR.PS-01, PR.IR-01, ID.AM-08, DE.CM-01
mitre_attack
T1610, T1611, T1609, T1525, T1195

Implementing Container Image Minimal Base with Distroless

Overview

Google distroless images contain only your application and its runtime dependencies, without package managers, shells, or other programs found in standard Linux distributions. By eliminating unnecessary OS components, distroless images achieve up to 95% reduction in attack surface compared to traditional base images like ubuntu or debian. Major projects including Kubernetes itself, Knative, and Tekton use distroless images in production. As of 2025, Docker also offers Hardened Images (DHI) as an open-source alternative for minimal container bases.

When to Use

  • When deploying or configuring implementing container image minimal base with distroless capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Docker 20.10+ or compatible container build tool (Buildah, Kaniko)
  • Multi-stage Dockerfile knowledge
  • Application compiled as a static binary or with runtime bundled
  • Container registry for image storage

Available Distroless Images

ImageUse CaseSize
gcr.io/distroless/static-debian12Statically compiled binaries (Go, Rust)~2MB
gcr.io/distroless/base-debian12Dynamically linked binaries needing glibc~20MB
gcr.io/distroless/cc-debian12C/C++ applications needing libstdc++~25MB
gcr.io/distroless/java21-debian12Java 21 applications~220MB
gcr.io/distroless/python3-debian12Python 3 applications~50MB
gcr.io/distroless/nodejs22-debian12Node.js 22 applications~130MB

Multi-Stage Build Patterns

Go Application
dockerfile
# Build stage
FROM golang:1.22-bookworm AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /server ./cmd/server

# Runtime stage - static distroless
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=builder /server /server
USER nonroot:nonroot
ENTRYPOINT ["/server"]
Java Application
dockerfile
# Build stage
FROM maven:3.9-eclipse-temurin-21 AS builder
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline
COPY src ./src
RUN mvn package -DskipTests

# Runtime stage - Java distroless
FROM gcr.io/distroless/java21-debian12:nonroot
COPY --from=builder /app/target/app.jar /app.jar
USER nonroot:nonroot
ENTRYPOINT ["java", "-jar", "/app.jar"]
Python Application
dockerfile
# Build stage
FROM python:3.12-bookworm AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --target=/deps -r requirements.txt
COPY . .

# Runtime stage - Python distroless
FROM gcr.io/distroless/python3-debian12:nonroot
WORKDIR /app
COPY --from=builder /deps /deps
COPY --from=builder /app /app
ENV PYTHONPATH=/deps
USER nonroot:nonroot
ENTRYPOINT ["python3", "/app/main.py"]
Node.js Application
dockerfile
# Build stage
FROM node:22-bookworm AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .

# Runtime stage - Node distroless
FROM gcr.io/distroless/nodejs22-debian12:nonroot
WORKDIR /app
COPY --from=builder /app .
USER nonroot:nonroot
CMD ["server.js"]
Show full SKILL.md (141 more words)Show less

Security Benefits

Attack Surface Comparison
ComponentUbuntuAlpineDistroless
Shell (bash/sh)YesYesNo
Package manageraptapkNo
coreutilsFullBusyBoxNo
curl/wgetYesYesNo
User managementYesYesNo
Known CVEs (typical)50-200+5-200-5
Image size (base)~77MB~7MB~2-20MB
Security Implications
  • No shell: Attackers cannot exec into containers to run commands
  • No package manager: Cannot install additional tools or malware
  • No coreutils: No cat, ls, find, curl for reconnaissance
  • Minimal CVEs: Fewer packages means fewer vulnerabilities to patch
  • Non-root by default: :nonroot tag runs as UID 65534

Debugging Distroless Containers

Since distroless has no shell, use these techniques for debugging:

Debug Image Variant
dockerfile
# Use debug variant in non-production environments only
FROM gcr.io/distroless/base-debian12:debug
# Includes busybox shell at /busybox/sh
bash
# Exec into debug variant
kubectl exec -it pod-name -- /busybox/sh
Ephemeral Debug Containers (Kubernetes 1.25+)
bash
# Attach a debug container with full tooling
kubectl debug -it pod-name --image=busybox:1.36 --target=app-container
Crane/Dive for Image Inspection
bash
# Inspect image layers without running
crane export gcr.io/distroless/static-debian12 - | tar -tf - | head -50

# Analyze image layers
dive gcr.io/distroless/static-debian12

Image Scanning Results

Typical vulnerability comparison using Trivy:

bash
# Scan Ubuntu-based image
trivy image myapp:ubuntu
# Result: 47 vulnerabilities (3 CRITICAL, 12 HIGH)

# Scan Distroless-based image
trivy image myapp:distroless
# Result: 2 vulnerabilities (0 CRITICAL, 0 HIGH)

References

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references, assets) in skills/implementing-container-image-minimal-base-with-distroless of mukul975/Anthropic-Cybersecurity-Skills.

  • SKILL.md
  • LICENSE
  • assets/template.md
  • references/api-reference.md
  • references/standards.md
  • references/workflows.md
  • scripts/agent.py
  • scripts/process.py

Open the folder on GitHubat commit 54a7988

Compare with similar skills

Implementing Container Image Minimal Base With Distroless next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Implementing Container Image Minimal Base With Distroless compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Implementing Container Image Minimal Base With Distroless this skillmukul975/Anthropic-Cybersecurity-Skills34k—~1.7kAutomated safety check: PassApache-2.0
DockerEliasOulkadi/shokunin114—~3.8kAutomated safety check: NotesMIT
Sca TrivyAgentSecOps/SecOpsAgentKit2202 repos~3.7kAutomated safety check: PassCustom licence
Houndarr CIav1155/houndarr292—~1.2kAutomated safety check: PassAGPL-3.0
Alibabacloud Ecs Sec Userspacealiyun/alibabacloud-ecs-troubleshoot-skills148—~2.6kAutomated safety check: NotesApache-2.0
Scanning Container Securityjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Docker

    EliasOulkadi/shokunin

    Optimize Docker images with multi-stage builds, distroless bases, BuildKit cache mounts, multi-arch builds, compose watch, security hardening (non-root, seccomp, capabilities drop), and…

    114 GitHub stars~3.8k tokensUpdated 5 days ago
    DevOps & CloudAuto-check: notes
  • Sca Trivy

    AgentSecOps/SecOpsAgentKit

    Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identifying CVE vulnerabilities in dependencies, container images, IaC misconfigurations, and license…

    220 GitHub starsUsed in 2 repos~3.7k tokens
    SecurityAuto-check passed
  • Houndarr CI

    av1155/houndarr

    Houndarr's CI workflow reference and branch protection. An agent skill from av1155/houndarr.

    292 GitHub stars~1.2k tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Alibabacloud Ecs Sec Userspace

    aliyun/alibabacloud-ecs-troubleshoot-skills

    Linux 用户态安全入侵检测与取证工具,专为 AI Agent 设计。自动判断服务器是否被入侵, 提供完整证据链和可执行修复建议。51 个安全分析器覆盖进程/网络/认证/持久化/Rootkit/ 恶意软件/内存取证/容器逃逸等 12 类检测维度,10 个数据采集器全面采集系统状态, 映射 103+ MITRE ATT&CK 技术,支持 standalone/docker/k8s 三种部署模式。

    148 GitHub stars~2.6k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Scanning Container Security

    jeremylongshore/tons-of-skills-marketplace

    Execute use when you need to work with security and compliance.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Minimega

    sandia-minimega/minimega

    This skill should be used when the user asks how to configure, run, automate, integrate, or troubleshoot minimega (VMs, namespaces, VLANs, clusters, miniccc, miniweb, command socket or Python API…

    160 GitHub stars~3.2k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed

More from mukul975/Anthropic-Cybersecurity-Skills

All 644 skills in this repo
  • Campaign Attribution Evidence Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Weighs infrastructure, TTP, malware code and timing evidence with the Diamond Model and competing hypotheses to reach a confidence-rated attribution.

    34k GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Go Malware Analysis in Ghidra

    mukul975/Anthropic-Cybersecurity-Skills

    Walks through reverse engineering Go-compiled malware in Ghidra: parsing buildinfo and pclntab, recovering stripped function names and extracting dependencies.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • LNK and Jump List Forensics

    mukul975/Anthropic-Cybersecurity-Skills

    Guides forensic analysis of Windows LNK shortcut files and Jump Lists with LECmd, JLECmd and manual parsing to show file access and program execution.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Malware Persistence Analysis with Autoruns

    mukul975/Anthropic-Cybersecurity-Skills

    Hunts Windows malware persistence with Sysinternals Autoruns, covering run keys, services, scheduled tasks and drivers, with baseline comparison.

    34k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • NTFS MFT Deleted File Recovery

    mukul975/Anthropic-Cybersecurity-Skills

    Guides a Windows forensic examination of the NTFS Master File Table to recover deleted-file evidence, build timelines and spot timestomping.

    34k GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Network Covert Channel Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Detects DNS tunneling, ICMP exfiltration and HTTP-based covert channels in packet captures and DNS logs when hunting for hidden command-and-control traffic.

    34k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Implementing Container Image Minimal Base With Distroless

What does Implementing Container Image Minimal Base With Distroless do?

Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using…. Implementing Container Image Minimal Base With Distroless is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Reduces container attack surface by building application images on Google distroless base images that ship only the application runtime - no shell, package manager, or OS utilities - using multi-stage build patterns plus debugging and scanning techniques adapted to distroless.

When should I use Implementing Container Image Minimal Base With Distroless?

Implementing Container Image Minimal Base With Distroless fits situations like: hardening container images; cutting attack surface in a container architecture; answering an assessment finding about bloated base images; scanning an image for known CVEs - use scanning-docker-images-with-trivy.

How do I install Implementing Container Image Minimal Base With Distroless in Claude Code?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-container-image-minimal-base-with-distroless -a claude-code`. Or copy the skill folder (skills/implementing-container-image-minimal-base-with-distroless in mukul975/Anthropic-Cybersecurity-Skills) into .claude/skills/implementing-container-image-minimal-base-with-distroless in your project. Claude Code loads it when a task matches its description.

How do I install Implementing Container Image Minimal Base With Distroless in Codex?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-container-image-minimal-base-with-distroless -a codex`. Or copy the skill folder (skills/implementing-container-image-minimal-base-with-distroless in mukul975/Anthropic-Cybersecurity-Skills) into .agents/skills/implementing-container-image-minimal-base-with-distroless in your project. Codex loads it when a task matches its description.

Can I use Implementing Container Image Minimal Base With Distroless in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-container-image-minimal-base-with-distroless -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/implementing-container-image-minimal-base-with-distroless, .gemini/skills/implementing-container-image-minimal-base-with-distroless, .github/skills/implementing-container-image-minimal-base-with-distroless and .opencode/skills/implementing-container-image-minimal-base-with-distroless in your project.

What does Implementing Container Image Minimal Base With Distroless need to run?

Going by SKILL.md and its folder, Implementing Container Image Minimal Base With Distroless needs Python for the scripts in its folder and the command-line tools its instructions call (kubectl and trivy). Our summary lists: Python 3; Node.js; Docker.

Does Implementing Container Image Minimal Base With Distroless access the network?

SKILL.md names 4 domains. As links in the text: github.com, docs.docker.com, medium.com and infoq.com. This is read from the text; nothing was executed.

Is Implementing Container Image Minimal Base With Distroless safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Implementing Container Image Minimal Base With Distroless use?

Implementing Container Image Minimal Base With Distroless is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Implementing Container Image Minimal Base With Distroless use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 762 tokens, read only when the agent opens those files.

What are the alternatives to Implementing Container Image Minimal Base With Distroless?

Skills that share tags, products or a category with Implementing Container Image Minimal Base With Distroless: Docker (EliasOulkadi/shokunin, 114 stars), Sca Trivy (AgentSecOps/SecOpsAgentKit, 220 stars), Houndarr CI (av1155/houndarr, 292 stars) and Alibabacloud Ecs Sec Userspace (aliyun/alibabacloud-ecs-troubleshoot-skills, 148 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Implementing Container Image Minimal Base With Distroless?

mukul975 (a GitHub user) maintains it in mukul975/Anthropic-Cybersecurity-Skills, which has 33,993 GitHub stars. The repository holds 644 skills in this directory. The repository was last updated on August 31, 2026.

Source: mukul975/Anthropic-Cybersecurity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.