docker-safety

docker-safety is a skill for Claude Code, Codex from catpilotai/catpilot-ai-guardrails. It costs 114 tokens per session (4,322 once invoked), scanned D, original, MIT.

A set of rules for building and running Docker containers more safely. Docker packages software and its dependencies into isolated containers.

In plain words
What is it for?
It is for checking Dockerfiles, Compose files, and container run commands for issues such as root users, unsafe privileges, unpinned image tags, and insecure secret handling.
Why use it?
It helps prevent container settings from exposing the host machine, leaking secrets into image history, or pulling changing and risky base images.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions Codex; built for openclaw.

Good fit It is for checking Dockerfiles, Compose files, and container run commands for issues such as root users, unsafe privileges, unpinned image tags, and insecure secret handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/catpilotai/catpilot-ai-guardrails/docker-safety
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 catpilotai/catpilot-ai-guardrails --skill docker-safety
Clone the repo
git clone --depth 1 https://github.com/catpilotai/catpilot-ai-guardrails

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 docker-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/docker-safety/github.svg)](https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/docker-safety)
Your own site
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/docker-safety"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/docker-safety/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 docker-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/catpilotai/catpilot-ai-guardrails/docker-safety"><img src="https://agentmods.dev/badge/skills/catpilotai/catpilot-ai-guardrails/docker-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,322 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 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.00114 $0.04322
Opus 5 $0.00057 $0.02161
Sonnet 5 $0.00023 $0.00864
Haiku 4.5 $0.00011 $0.00432

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

Security

Grade D, and why

docker-safety scanned grade D with 3 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 11d 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 rootmediumPrivilege escalation

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

### Rule 2 — Non-root `USER` is mandatory; no images run as root

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

(`rm -rf /var/lib/apt/lists/*` for apt, `apk --no-cache` for apk,

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

RUN apt-get update && apt-get install -y python3 curl
src/skills/core/docker-safety/SKILL.md · 476 lines

How it starts

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

Why

A Docker image and its run command together define the security posture of every workload they produce. The same image can ship as a hardened, non-root, read-only filesystem service — or as a root-owned container with the host's /var/run/docker.sock mounted in, one docker exec away from a host takeover.

The failures this skill blocks share a common shape: a single line in a Dockerfile, a docker-compose.yml, or a docker run flag that breaks the isolation boundary the container is supposed to provide.

  • FROM node:latest ships a moving target. The same Dockerfile builds a different image week to week, and a CVE fixed upstream silently re-enters when the tag floats backward.
  • A container running as root has UID 0 on the host's kernel namespace. With certain capabilities or a misconfigured runtime, a container compromise becomes a host compromise.
  • ENV API_KEY=sk_live_... writes the secret into a layer that lives in the image's history forever — pushed to every registry the image is pushed to, pulled to every host that runs it.
  • --privileged disables every capability filter, seccomp profile, and AppArmor profile the runtime would otherwise apply. The container is effectively a process running on the host with containment-as-suggestion.
  • --net=host shares the host's network namespace, so the container can bind to host ports, reach host services on 127.0.0.1, and receive traffic intended for the host. Combined with a vulnerable service in the container, this is a direct path to LAN exposure.
  • A bind-mount of / or /var/run/docker.sock from the host into the container hands the container read/write access to the host filesystem or the host's Docker daemon. Either is escape-class.

This skill applies the same query-then-modify discipline used elsewhere in the bundle: non-root by default, immutable by default, no secrets at build time, no host-namespace sharing.

When to apply

Apply this skill before the agent writes, recommends, or commits any of the following:

Read the full file on GitHub · 476 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. 11d ago First seen · 476 lines · 114 tokens per session scan D 24656937f2d4

Subscribe to this mod's changes

docker-safety is a skill published in the GitHub repository catpilotai/catpilot-ai-guardrails (2 stars, last pushed 2mo ago), licensed MIT. It adds 114 tokens to every session and 4,322 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, 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.

Related

Other skills, from other repositories

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

compute-env-setup

Set up a reproducible Feynman compute environment for research jobs. Use when a task needs Python/R packages, GPU libraries, containers, Modal, SSH, caches, or managed model runtime setup.

companion-inc/feynman · 45 tokens

securing-kubernetes-on-cloud

This skill covers hardening managed Kubernetes clusters on EKS, AKS, and GKE by implementing Pod Security Standards, network policies, workload identity, RBAC scoping, image admission controls, and runtime security monitoring. It addresses cloud-specific security features including IRSA for EKS, Workload Identity for…

xalgorix/xalgorix · 80 tokens

detecting-privilege-escalation-in-kubernetes-pods

Detect and prevent privilege escalation in Kubernetes pods by monitoring security contexts, capabilities, and syscall patterns with Falco and OPA policies.

xalgorix/xalgorix · 40 tokens

implementing-rbac-hardening-for-kubernetes

Harden Kubernetes Role-Based Access Control by implementing least-privilege policies, auditing role bindings, eliminating cluster-admin sprawl, and integrating external identity providers.

xalgorix/xalgorix · 41 tokens

docker-socket-mount

Docker / containerd socket mounted into a container → host RCE. Common in CI runners, GitOps controllers (ArgoCD, Flux), and 'Docker-in-Docker' setups. Single-command escape via docker run --rm --privileged -v /:/host alpine chroot /host.

PurpleAILAB/Decepticon · 67 tokens