Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Codenpx agentmods add skills/hermeticormus/libresecops-claude-code/dockerfile-hardeningWrote 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/hermeticormus/libresecops-claude-code/dockerfile-hardening)<a href="https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/dockerfile-hardening"><img src="https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/dockerfile-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.
<a href="https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/dockerfile-hardening"><img src="https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/dockerfile-hardening.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00048 | $0.02203 |
| Opus 5.5 | $0.00019 | $0.00881 |
| Sonnet 5.5 | $0.00010 | $0.00441 |
| Haiku 4.5 | $0.00005 | $0.00220 |
Grade B, and why
dockerfile-hardening scanned grade B with 2 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.
Recursive force deletemediumDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
&& rm -rf /var/cache/apk/* Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1 How it starts
The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dockerfile Hardening
Secure Dockerfile patterns, multi-stage builds, minimal base images, and build-time security practices.
Knowledge Base
Container Image Security Model
A container image is a stack of filesystem layers. Each Dockerfile instruction creates a layer. Security implications:
- Layers are permanent. Even if you
RUN rm /secretin a later layer, the file exists in the layer where it was created. Anyone withdocker historyordivecan extract it. - Layers are shared. If two images share a base, they share layers. A vulnerability in the base affects all derived images.
- The build context is sent to the daemon. Without
.dockerignore, your entire directory (including.env,.git,node_modules) is sent to the Docker daemon.
Base Image Hierarchy (Most to Least Secure)
| Base | Size | Packages | Debug Tools | Use Case |
|---|---|---|---|---|
scratch |
0 MB | None | None | Statically compiled Go/Rust binaries |
gcr.io/distroless/* |
2-20 MB | Runtime only (glibc, libssl) | None | Java, Python, Node.js runtimes |
cgr.dev/chainguard/* |
5-30 MB | Minimal, hardened, daily-patched | Minimal | Production workloads needing updates |
alpine |
5 MB | musl, busybox, apk | Basic shell | General purpose, small footprint |
debian-slim |
75 MB | glibc, apt, basic utils | Some | When Alpine compatibility issues arise |
ubuntu |
75 MB | Full distribution | Full | Development, not recommended for production |
Patterns
Pattern 1: Multi-Stage Build (Node.js)
# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
# Install dependencies first (cache optimization)
COPY package.json package-lock.json ./
RUN npm ci --only=production
# Copy source and build
COPY src/ ./src/
COPY tsconfig.json ./
RUN npm run build
# Stage 2: Runtime (distroless)
FROM gcr.io/distroless/nodejs22-debian12:nonroot
WORKDIR /app
# Copy only production artifacts
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
# Distroless already runs as nonroot (uid 65532)
EXPOSE 3000
CMD ["dist/server.js"]
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.
- 1mo ago Changed · +5 lines · +48 tokens per session 7d5d73687a24
- 3mo ago First seen · 255 lines · 0 tokens per session scan B 78b1db6c1558
dockerfile-hardening is a skill published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 2,203 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
dockerfile-hardening compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dockerfile-hardeningHermeticOrmus/LibreSecOps-Claude-Code | Skill | 4 | 1mo ago | MIT | B | 48 | Claude Code |
| building-devsecops-pipeline-with-gitlab-ciadriannoes/awesome-agentic-ai | Skill | 108 | 2d ago | MIT | A | 43 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-ci26zl/cybersec-toolkit | Skill | 113 | 4d ago | MIT | A | 101 | Claude Code |
| building-devsecops-pipeline-with-gitlab-ciautohandai/community-skills | Skill | 14 | 4mo ago | Apache-2.0 | A | 43 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-ciNjones17/AI-agent-master-cyber-skills-list | Skill | 27 | 8mo ago | none | A | 43 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-ciRobotFlow-Labs/skills-repo | Skill | 2 | 8mo ago | none | A | 43 | Claude Code, Codex |
| implementing-devsecops-security-scanningxalgorix/xalgorix | Skill | 1.5k | yesterday | Apache-2.0 | A | 109 | Claude Code, Codex |