Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/backspace-shmackspace/claude-devkit/container-hardeningnpx skills add backspace-shmackspace/claude-devkit --skill container-hardeninggit clone --depth 1 https://github.com/backspace-shmackspace/claude-devkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/backspace-shmackspace/claude-devkit/container-hardening)<a href="https://agentmods.dev/skills/backspace-shmackspace/claude-devkit/container-hardening"><img src="https://agentmods.dev/badge/skills/backspace-shmackspace/claude-devkit/container-hardening.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.00893 |
| Opus 5 | $0.00018 | $0.00447 |
| Sonnet 5 | $0.00007 | $0.00179 |
| Haiku 4.5 | $0.00004 | $0.00089 |
Grade A, and why
container-hardening scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Container Hardening
Base Image Selection
- Use a Universal Base Image (UBI) from the official Red Hat Container Registry
- Prefer ubi-minimal (
ubi8/ubi-minimalorubi9/ubi-minimal) to reduce attack surface - Use the most up-to-date image available
Image Tagging Strategy
| Source | Strategy |
|---|---|
| Red Hat Catalog | Omit floating tags to get the latest image; exception: Konflux project uses digest-based pinning with automated updates |
| Non-Red Hat registries | Pin the version or digest to ensure you use the intended image and not a tampered one |
Minimize Installed Software
Remove non-essential packages and clean up package manager caches:
RUN microdnf upgrade -y && \
microdnf install -y <required-packages> && \
microdnf remove -y <unnecessary-packages> && \
microdnf clean all
Use microdnf on ubi-minimal images; dnf on full UBI images.
Runtime Security
Privilege Restrictions
Set no-new-privileges to prevent privilege escalation during container execution:
securityContext:
allowPrivilegeEscalation: false
Or in a compose file:
security_opt:
- no-new-privileges: true
Read-Only Filesystem
Use read-only root filesystems wherever possible:
securityContext:
readOnlyRootFilesystem: true
Mount writable tmpfs volumes only where the application requires write access (e.g., /tmp, /var/run).
Read-Only Volumes
Mount volumes as read-only unless the container must write to them:
volumeMounts:
- name: config
mountPath: /etc/app
readOnly: true
Containerfile Linting
Use Hadolint to lint Containerfiles for best-practice violations and inline bash issues:
hadolint Containerfile
Hadolint catches common issues (running as root, missing version pins, unnecessary sudo) but should not be trusted without additional verification.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 107 lines · 36 tokens per session scan A b169c6bedf81
container-hardening is a skill published in the GitHub repository backspace-shmackspace/claude-devkit (15 stars, last pushed 11d ago), licensed MIT. It adds 36 tokens to every session and 893 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
agenticx-deployer
Guide for deploying AgenticX agents to production including Docker containerization, Kubernetes orchestration, Volcengine AgentKit cloud deployment, and API server setup. Use when the user wants to deploy agents, containerize applications, set up Kubernetes, configure cloud deployment, or run the AgenticX API server…
docker-expert
Use when containerizing an application with Docker, optimizing multi-stage builds and image size, designing Docker Compose services, troubleshooting container networking or volumes, or adding secure image build and CI/CD practices.
grype-syft-sbom-scanner
用于通过 Syft 生成 SBOM,并用 Grype 扫描容器镜像、文件系统、软件包、归档和 SBOM 漏洞。.
kubernetes-specialist
Use when managing Kubernetes clusters, debugging Pods and workloads, designing Helm charts, reviewing manifests, or improving deployment, scaling, and observability practices.
branchbox-devcontainer-guardrails
Use when modifying BranchBox devcontainer/bootstrap workflows, compose templates, feature env-stash behavior, or manual E2E harness/release docs. Apply issue.
server-management
Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.