hardening-docker-daemon-configuration

hardening-docker-daemon-configuration is a skill for Claude Code, Codex from xalgorix/xalgorix. It costs 36 tokens per session (2,545 once invoked), scanned B, original, Apache-2.0.

A guide to securing the Docker daemon, the background service that manages containers and normally runs with high system privileges. It covers settings such as encrypted client access, rootless operation, and user namespace remapping.

In plain words
What is it for?
Use it to secure Docker’s configuration, protect its remote API, reduce container privileges, and check settings against Docker security guidance.
Why use it?
It reduces the chance that a stolen Docker connection or unsafe configuration gives someone control of the host machine. It also addresses common privilege-escalation paths.

Skill for Claude CodeCodex

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

Good fit Use it to secure Docker’s configuration, protect its remote API, reduce container privileges, and check settings against Docker security guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xalgorix/xalgorix/hardening-docker-daemon-configuration
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 xalgorix/xalgorix --skill hardening-docker-daemon-configuration
Clone the repo
git clone --depth 1 https://github.com/xalgorix/xalgorix

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 hardening-docker-daemon-configuration

README.md
[![agentmods](https://agentmods.dev/badge/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration/github.svg)](https://agentmods.dev/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration)
Your own site
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration/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 hardening-docker-daemon-configuration

Your own site · 80×15
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/hardening-docker-daemon-configuration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,545 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 30 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 41
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 43
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 44
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 240
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 333
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 218
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 236
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 237
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 243
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 319
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Tool Misuse · line 250
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Privilege Escalation · line 318
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • medium Privilege Escalation · line 51
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 240
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium MCP Rug Pull · line 137
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 318
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium Privilege Escalation · line 201
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 202
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 205
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 206
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00036 $0.02545
Opus 5 $0.00018 $0.01273
Sonnet 5 $0.00007 $0.00509
Haiku 4.5 $0.00004 $0.00254

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

Security

Grade B, and why

hardening-docker-daemon-configuration scanned grade B 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 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 rootlowPrivilege escalation

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

- Root or sudo access to the Docker host

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://get.docker.com/rootless | sh

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 -fsSL https://get.docker.com/rootless | sh
internal/tools/skills/data/container-security/hardening-docker-daemon-configuration/SKILL.md · 336 lines

How it starts

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

Hardening Docker Daemon Configuration

Overview

The Docker daemon (dockerd) runs with root privileges and controls all container operations. Hardening its configuration through /etc/docker/daemon.json, TLS certificates, user namespace remapping, and network restrictions is essential to prevent privilege escalation, lateral movement, and container breakout attacks.

When to Use

  • When deploying or configuring hardening docker daemon configuration capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Common Misconfigurations & Verification

  • Remote API exposed without mTLS: "hosts": ["tcp://0.0.0.0:2376"] with "tlsverify" absent (or any listener on 2375) is unauthenticated root over the network. Verify: ss -tlnp | grep -E '2375|2376' and docker info should report TLS; client must use --tlsverify.
  • userns-remap defeated per-container: even with "userns-remap": "default", a container started with --userns=host (or --privileged, which implies it) maps back to real root. Confirm cat /etc/subuid shows dockremap: and that workloads do not pass --userns=host.
  • icc: false gives false comfort: it only blocks the default bridge; user-defined bridges still allow container-to-container traffic. Verify with docker network inspect bridge --format '{{.Options}}'.
  • Rootless claimed but daemon still root: check docker info | grep -i rootless returns Rootless: true and the socket is under $XDG_RUNTIME_DIR, not /var/run/docker.sock owned by root.
  • Socket permissions too broad: confirm /var/run/docker.sock is root:docker 660, not world-accessible, and is never bind-mounted into containers.
  • no-new-privileges / seccomp not applied: docker info --format '{{.SecurityOptions}}' should list seccomp and no-new-privileges; an empty/unconfined seccomp is a finding.
  • Verify the full config: run docker/docker-bench-security and resolve section 2 (daemon) [WARN]s.

Read the full file on GitHub · 336 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 · 336 lines · 36 tokens per session scan B 3539304d1718

Subscribe to this mod's changes

hardening-docker-daemon-configuration is a skill published in the GitHub repository xalgorix/xalgorix (971 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 2,545 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.