ring:hardening-dockerfiles

ring:hardening-dockerfiles is a skill for Claude Code, Codex from LerianStudio/ring. It costs 106 tokens per session (1,297 once invoked), scanned A, original, Apache-2.0.

A workflow for securing Dockerfiles and container images before publishing them to Docker Hub.

In plain words
What is it for?
Use it when creating or auditing a Dockerfile, preparing an image for Docker Hub, or improving its security health score.
Why use it?
It checks for common container risks such as running as root, vulnerable base images, unwanted licenses, and missing software supply-chain records.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app ./cmd/....

Install

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.

Clone the repo
git clone --depth 1 https://github.com/LerianStudio/ring
agentmods
npx agentmods add skills/lerianstudio/ring/hardening-dockerfiles

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 ring:hardening-dockerfiles

README.md
[![agentmods](https://agentmods.dev/badge/skills/lerianstudio/ring/hardening-dockerfiles.svg)](https://agentmods.dev/skills/lerianstudio/ring/hardening-dockerfiles)
Your own site
<a href="https://agentmods.dev/skills/lerianstudio/ring/hardening-dockerfiles"><img src="https://agentmods.dev/badge/skills/lerianstudio/ring/hardening-dockerfiles.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,297 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00106 $0.01297
Opus 5 $0.00053 $0.00648
Sonnet 5 $0.00021 $0.00259
Haiku 4.5 $0.00011 $0.00130

Measured 3d ago against content hash a489c09e32c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ring:hardening-dockerfiles 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 3d 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.

dev-team/skills/hardening-dockerfiles/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker Security (Health Score Grade A)

When to use

  • Creating a new Dockerfile
  • Auditing an existing Dockerfile for security
  • Preparing images for Docker Hub publication
  • Docker Hub health score is below grade A

Skip when

  • Project has no Dockerfile and none is being created
  • Changes are application-code only with no Docker modifications
  • Using pre-built images without custom Dockerfile

Complementary: ring:implementing-tasks, ring:creating-helm-charts

General Dockerfile patterns: dev-team/docs/standards/devops.md#containers. This skill focuses on Docker Hub Health Score compliance.

Health Score Policies

# Policy Weight Compliance
1 Default non-root user Required USER directive with non-root user
2 No fixable critical/high CVEs Required Distroless or Alpine, multi-stage
3 No high-profile vulnerabilities (CISA KEV) Required Up-to-date base images
4 No AGPL v3 licenses Required Audit dependencies
5 Supply chain attestations (SBOM + provenance) Required Pipeline config
6 No outdated base images Optional Only for Docker Hub hosted images
7 No unapproved base images Optional Only for Docker Hub hosted images

Policies 6-7 are not evaluated when using non-Docker Hub base images (gcr.io/distroless, etc.).

Policy Implementation

Policy 1 — Non-Root User

# Alpine
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser

# Debian/Ubuntu
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
USER appuser

# Distroless (pre-existing user)
USER nonroot:nonroot

USER root does NOT satisfy this policy.

Policies 2 & 3 — Minimal Attack Surface

# Go (statically compiled) — ~0 CVEs
FROM gcr.io/distroless/static-debian12

# Go (CGO) or general
FROM gcr.io/distroless/base-debian12

# Node.js
FROM node:22-alpine

# Multi-stage mandatory
FROM golang:1.23-alpine AS builder
# ... build ...
FROM gcr.io/distroless/static-debian12
COPY --from=builder /app/binary /app/binary

Read the full file on GitHub · 175 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. 3d ago First seen · 175 lines · 106 tokens per session scan A a489c09e32c9

Subscribe to this mod's changes

ring:hardening-dockerfiles is a skill published in the GitHub repository LerianStudio/ring (211 stars, last pushed 17d ago), licensed Apache-2.0. It adds 106 tokens to every session and 1,297 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

staging-deploy

Build, push, migrate, and deploy to staging environment with health check verification. Use when deploying a completed phase to staging.

srnichols/plan-forge · 30 tokens

execution/infra-executor

Internal: Infrastructure Executor. Implements deployment, CI/CD, container, IaC, and environment configuration changes. Write evidence on completion.

dynos-fit/dynos-work · 32 tokens

memstack-deployment-docker-setup

Use this skill when the user says 'Docker', 'Dockerfile', 'docker-compose', 'containerize', 'docker-setup', or needs to containerize an application with optimized Docker images and compose configurations. Do NOT use for serverless or static site deployments.

cwinvestments/memstack · 62 tokens

devops

You are the DevOps Specialist -- the single authority on version control, CI/CD pipelines, platform operations (GitHub, Azure DevOps, GitLab), infrastructure, deployment, backup, and cleanup. If it touches git, pipelines, or production infrastructure, it's yours.

samibs/skillfoundry · 6 tokens

code-review

Plan-Forge-tuned comprehensive code review — runs public-surface diff, forge analysis, architecture / security / testing / patterns checks, plus Plan-Forge-specific gates (ACI compliance, dual-shell parity, branch model). Use before merging features or at the end of a phase. With --quorum, dispatches multi-model…

srnichols/plan-forge · 70 tokens

stakeholder-briefing

Generate a per-organisation stakeholder briefing for Plan Forge from the canonical template, optionally drafting the prospect-specific sections from a source directory of customer materials. Use when an internal champion needs to walk a colleague or VP through the decision to adopt Plan Forge.

srnichols/plan-forge · 55 tokens