helix.mcp: Skill for Claude Code

.squad/skills/container-image-hardening/SKILL.md

container-image-hardening is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 0 tokens per session (1,738 once invoked), scanned A, original, MIT.

A checklist for hardening a new Docker image and its GitHub Actions publishing workflow. Docker images package an application and its runtime, and GitHub Actions runs automated work such as builds and releases.

In plain words
What is it for?
Adding a dedicated non-root runtime user, setting a controlled home directory, placing system-wide setup before the user switch, and checking the resulting container workflow.
Why use it?
It reduces risks in the baseline image before the first real image is published, including unnecessary root access and overly broad home-directory permissions.

Skill for Claude CodeCodex

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

This is lewing/helix.mcp's own configuration. It tells Claude Code and Codex how to work on helix.mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helix.mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.squad/skills/container-image-hardening/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

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-image-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/container-image-hardening/github.svg)](https://agentmods.dev/skills/lewing/helix.mcp/container-image-hardening)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/container-image-hardening"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/container-image-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-image-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/lewing/helix.mcp/container-image-hardening"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/container-image-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01738
Opus 5 $0.00000 $0.00869
Sonnet 5 $0.00000 $0.00348
Haiku 4.5 $0.00000 $0.00174

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

Security

Grade A, and why

container-image-hardening scanned grade A 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 12d 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

Running as root with a world-writable home (`chmod 0777`) allows any co-tenant process to replace files in the home directory (e.g., SQLite cache). A dedicated non-root user restricts writes to that UID.

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.

curl -s -I \
.squad/skills/container-image-hardening/SKILL.md · 177 lines

How it starts

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

SKILL: Container Image Hardening

Context: Pre-publish hardening steps for a new Dockerfile + GitHub Actions workflow. Apply before the first real image publish so the baseline is clean.


Recipe 1 — Non-root user

Why

Running as root with a world-writable home (chmod 0777) allows any co-tenant process to replace files in the home directory (e.g., SQLite cache). A dedicated non-root user restricts writes to that UID.

Pattern

# In the runtime stage, before WORKDIR/COPY:

# -r = system user (no password aging, no login shell — appropriate for service accounts)
# -u 1000 = stable UID; conventional first non-system user, predictable for bind-mount semantics
# -d = home dir path
# -m = create home dir owned by hlx:hlx (no extra chown/chmod needed)
RUN useradd -r -u 1000 -d /home/hlx -m hlx

ENV HOME=/home/hlx

WORKDIR /app
COPY --from=build /publish .

# Any RUN steps that write to system paths (e.g., /usr/local/bin) must come BEFORE USER
RUN ln -s /app/HelixTool /usr/local/bin/hlx

# Switch to non-root before runtime.
# docker run --rm -i (stdio MCP via gh-aw) is unaffected — stdin/stdout are
# file descriptors and do not require host-side UID matching.
USER hlx

ENTRYPOINT ["hlx"]

Key rules

  1. RUN useradd must come before USER hlx (obviously).
  2. Any RUN that writes to system paths (symlinks into /usr/local/bin, apt-get, etc.) must also come before USER hlx.
  3. useradd -m creates the home directory with correct ownership — do not add chmod 0777 afterward.
  4. For stdio MCP containers: docker run --rm -i passes stdin via file descriptor, not via TTY — non-root UID does not interfere.

Recipe 2 — Digest-pin base images

Why

Mutable tags like :10.0 can be updated at any time. A rebuild days later may pull a different image, producing a non-reproducible build. Digest pins lock the exact image layer set.

How to get digests (no Docker daemon needed)

curl -s -I \
  -H "Accept: application/vnd.docker.distribution.manifest.list.v2+json" \
  "https://mcr.microsoft.com/v2/dotnet/sdk/manifests/10.0" \
  | grep -i "docker-content-digest"

curl -s -I \
  -H "Accept: application/vnd.docker.distribution.manifest.list.v2+json" \
  "https://mcr.microsoft.com/v2/dotnet/runtime/manifests/10.0" \
  | grep -i "docker-content-digest"

Read the full file on GitHub · 177 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. 12d ago First seen · 177 lines · 0 tokens per session scan A 828a9b4ffc24

Subscribe to this mod's changes

container-image-hardening is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,738 tokens. A static security scan graded it A with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

deployment

Use when taking an app from source to live: choosing the deploy target from requirements (Hetzner+Coolify vs Vercel vs a third), then wiring container → CI → registry → host with build secrets, healthchecks and rollback. NOT one platform's mechanics (that is coolify, vercel, railway, render), NOT the Dockerfile alone…

ericrisco/rsc-harness · 86 tokens

CI/CD Pipeline Advanced

Expert-level CI/CD pipeline skill for test automation. Covers GitHub Actions, Jenkins, GitLab CI, Azure DevOps, parallel execution, matrix strategies, caching, artifact management, and deployment gates.

PramodDutta/qaskills · 45 tokens

argot-setup-ci

Wire argot into a repository's GitHub Actions as a non-blocking configured check on every pull request — a job summary plus code-scanning annotations. Use when the user wants argot "in CI", "on PRs", "as a GitHub Action", or asks to "set up argot CI". Distinct from argot-setup (local checking) and argot-review-pr…

get-tmonier/argot · 94 tokens

securing-cloud-and-supply-chain

A guide to protecting cloud infrastructure and the software supply chain, the systems and dependencies used to build and deliver software.

telagod/code-abyss · 85 tokens

provisioning-infrastructure

Cloud-native infrastructure knowledge reference covering Kubernetes, Helm, Kustomize, Operators, CRDs, GitOps (ArgoCD, Flux), and IaC (Terraform, Pulumi, CDK). Use when provisioning infrastructure, managing clusters, or working with GitOps workflows.

telagod/code-abyss · 61 tokens

orchardcore-docker

Skill for containerizing Orchard Core with Docker. Covers Dockerfile creation with multi-stage builds, dockerignore configuration, docker-compose setup for multiple database providers, HTTPS deployment in containers, environment-specific targeting, image optimization, and CI/CD considerations. Use this skill when…

CrestApps/CrestApps.AgentSkills · 168 tokens