container-hardening

container-hardening is a skill for Claude Code, Codex from backspace-shmackspace/claude-devkit. It costs 36 tokens per session (893 once invoked), scanned A, original, MIT.

Instructions for making container images and their runtime settings safer. Containers package an application with the software it needs to run.

In plain words
What is it for?
They are for reviewing or hardening Dockerfiles, Containerfiles, Docker Compose files, and Kubernetes pod security settings.
Why use it?
They reduce unnecessary software, avoid uncontrolled image versions, and limit permissions that could be abused.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit They are for reviewing or hardening Dockerfiles, Containerfiles, Docker Compose files, and Kubernetes pod security settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/backspace-shmackspace/claude-devkit/container-hardening
Install

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.

Any agent
npx skills add backspace-shmackspace/claude-devkit --skill container-hardening
Clone the repo
git clone --depth 1 https://github.com/backspace-shmackspace/claude-devkit

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for container-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/backspace-shmackspace/claude-devkit/container-hardening/github.svg)](https://agentmods.dev/skills/backspace-shmackspace/claude-devkit/container-hardening)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for container-hardening

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 893 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00893
Opus 5.5 $0.00014 $0.00357
Sonnet 5.5 $0.00007 $0.00179
Haiku 4.5 $0.00004 $0.00089

Measured 1mo ago against content hash b169c6bedf81, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

skills/container-hardening/SKILL.md · 107 lines

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-minimal or ubi9/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.

Read the full file on GitHub · 107 lines

Changes

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.

  1. 1mo ago First seen · 107 lines · 36 tokens per session scan A b169c6bedf81

Subscribe to this mod's changes

container-hardening is a skill published in the GitHub repository backspace-shmackspace/claude-devkit (15 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 893 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

docker-expert

You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.

FilippoDeSilva/skills · 44 tokens

nestjs-deployment

Containerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks. Use when writing Dockerfiles, configuring K8s deployments, or adding shutdown hooks for NestJS.

FilippoDeSilva/skills · 46 tokens

add-iron-proxy

Install or refresh Iron Proxy and its official Iron Control web console for NanoClaw. Use when selecting the Iron gateway, adding its management UI, configuring credentials and grants, or restoring the proxy, approval bridge, and agent guidance.

nanocoai/nanoclaw · 52 tokens

manage-mounts

Configure which host directories agent containers can access. View, add, or remove mount allowlist entries. Triggers on "mounts", "mount allowlist", "agent access to directories", "container mounts".

nanocoai/nanoclaw · 47 tokens

devops-engineer

Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates. Handles deployment automation, GitOps configuration, incident response runbooks, and internal developer platform tooling. Use when setting up CI/CD pipelines, containerizing…

Jeffallan/claude-skills · 107 tokens

offensive-container-escape

Container escape and breakout techniques targeting Docker, containerd, and Podman runtimes. Covers privileged container breakout via host filesystem mount and nsenter, Docker socket abuse through /var/run/docker.sock, Linux capability exploitation including CAPSYSADMIN, CAPSYSPTRACE, and CAPNETADMIN, cgroup v1…

SnailSploit/Claude-Red · 196 tokens