Works with the AI Agents you already use
Docker Container Runtime Security Audit
by Saizul Amin
Audit and harden how containers run, from `docker inspect` JSON.
$9
Docker Container Runtime Security Audit
Example session with this skill installed
Run the Docker Container Runtime Security Audit skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the docker container runtime
Here is what the Docker Container Runtime Security Audit skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
HIGH portainer: host-network: shares the host network namespace
fix: drop --network=host / network_mode: host; publish the ports you need on a user-defined network
HIGH portainer: host-pid: shares the host pid namespace
fix: drop --pid=host (pid: host in compose); share a namespace with one container instead
HIGH portainer: root-user: process runs as root (Config.User is empty or root)
fix: set USER in the Dockerfile or run with --user 10001:10001 (compose: user: '10001:10001')
HIGH portainer: seccomp-unconfined: seccomp is disabled
fix: remove seccomp=unconfined; use a custom profile
HIGH portainer: sensitive-mount: host path /etc mounted read-write at /host-etc
fix: mount only the specific file or directory needed, read-only (:ro)
MEDIUM portainer: host-device: host device /dev/kmsg passed in
fix: pass only the device the app needs and document why
MEDIUM portainer: secret-env: secret-looking environment variables: ADMIN_PASSWORD (visible to 'docker inspect')
fix: use Docker/compose secrets or *_FILE variables pointing at mounted files
LOW portainer: no-memory-limit: no memory limit
fix: set --memory (compose: mem_limit or deploy.resources)
LOW portainer: no-new-privileges: setuid binaries can still raise privileges
fix: --security-opt no-new-privileges:true (compose: security_opt: [no-new-privileges:true])
LOW portainer: no-pids-limit: no PID limit (fork bombs exhaust the host)
fix: --pids-limit 200 (compose: pids_limit)
LOW portainer: writable-rootfs: root filesystem is writable
fix: --read-only with --tmpfs /tmp (compose: read_only: true, tmpfs: [/tmp])
INFO portainer: port-all-interfaces: 9443/tcp published on all interfaces (host port 9443)
fix: bind to 127.0.0.1 if only a local reverse proxy needs it (note: Docker bypasses ufw rules)
1 container(s): 0 critical, 5 high, 2 medium, 4 low, 1 info
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Audit and harden how containers run, from docker inspect JSON. A script flags privileged mode, host network/PID/IPC/UTS namespaces, a mounted docker.sock or containerd/podman socket, sensitive host paths (/, /etc, /root, /proc, /var/lib/docker) mounted read-write, root user, dangerous added capabilities (SYS_ADMIN, SYS_PTRACE, NET_ADMIN, ALL), no cap_drop ALL, seccomp/AppArmor/SELinux disabled, missing no-new-privileges, writable root filesystem, host devices, no memory or PID limits, ports on all interfaces and secret-looking env var names (values never printed). Includes hardened docker run and compose snippets (read_only + tmpfs, cap_drop, security_opt, user, rootless/userns-remap).
Who it's for
Use when the user asks if their containers are secure, wants to harden docker run or compose settings, mounts the Docker socket, runs privileged containers, or needs a runtime security review on a server.
What's inside
- Tested, offline Python script(s): audit_inspect.py (deterministic results, standard library only unless noted)
- Reference guides: hardening.md
- Step-by-step agent instructions in SKILL.md covering: When to use; When not to use; Workflow
Why it's worth it
Generic prompts guess. This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice. See the real demo below.
Works with every major AI agent
Built on the open SKILL.md standard: Claude Code, Codex CLI, Cursor, VS Code Copilot, Gemini CLI, Windsurf and 20+ other agents.
Requirements
- Python 3.8+ for the bundled scripts
- No API keys, no account, runs locally
Open source: saizul/docker-container-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
- Software
Python 3.8+