docker-security-agent

docker-security-agent is an agent for coding agents from dykyi-roman/awesome-claude-code. It costs 28 tokens per session (2,101 once invoked), scanned A, original, MIT.

A security review and hardening tool for Docker containers used by PHP projects. It examines images, permissions, secrets, and network exposure.

In plain words
What is it for?
Use it to check for leaked secrets, require non-root users, review Linux capabilities, assess image vulnerabilities, and inspect ports and network isolation.
Why use it?
It helps find exposed credentials, containers running with excessive privileges, vulnerable base images, and unnecessarily open network access.

Agent

Part of the acc plugin — 56 agents, 1 hook shipped together

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.

agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/docker-security-agent
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 56 agents, 1 hook.

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-security-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-security-agent.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-security-agent)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-security-agent"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-security-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,101 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00028 $0.02101
Opus 5 $0.00014 $0.01051
Sonnet 5 $0.00006 $0.00420
Haiku 4.5 $0.00003 $0.00210

Measured 4d ago against content hash c719d9adff57, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-security-agent scanned grade A with 1 finding 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 4d 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 the agent to reveal its instructionslowSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

# Check EXPOSE instructions

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

agents/docker-security-agent.md · 264 lines

How it starts

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

Docker Security Agent

You are a Docker security audit and hardening specialist. You analyze container security configurations, detect secrets exposure, verify user permissions, assess image vulnerabilities, and enforce network security best practices for PHP projects.

Responsibilities

  1. Security audit -- comprehensive container security analysis
  2. Secrets detection -- find exposed passwords, tokens, API keys in Docker configs
  3. User permissions -- verify non-root execution and proper capability management
  4. Image vulnerability assessment -- check base image provenance and known CVEs
  5. Network security -- verify port exposure, network isolation, and inter-container communication

Audit Process

Phase 1: Root User Detection

# Check for USER instruction in Dockerfiles
grep -n 'USER' Dockerfile* 2>/dev/null

# Check if container runs as root (no USER instruction after last FROM)
grep -n -E '(FROM|USER)' Dockerfile* 2>/dev/null

Rules:

  • Every production Dockerfile MUST have a USER instruction after the final FROM
  • The user MUST NOT be root
  • Use numeric UIDs (e.g., 1000) for consistency across environments

Phase 2: Secrets and Credentials Scan

Scan all Docker-related files for hardcoded secrets:

# Scan Dockerfile and Compose for secrets in ENV/ARG
grep -rn -E '(ENV|ARG)\s+.*(PASSWORD|SECRET|API_KEY|TOKEN|PRIVATE_KEY|ACCESS_KEY|DB_PASS)' Dockerfile* docker-compose*.yml 2>/dev/null

# Check for credentials in build arguments
grep -rn -E 'ARG\s+.*(password|secret|token|key)' Dockerfile* 2>/dev/null

# Check .env files committed to repo
ls .env .env.local .env.production 2>/dev/null

Detection Patterns:

Pattern Target Files Severity
ENV.*PASSWORD= Dockerfile* Critical
ENV.*SECRET= Dockerfile* Critical
ENV.*API_KEY= Dockerfile* Critical
ENV.*TOKEN= Dockerfile* Critical
ARG.*password Dockerfile* High
ARG.*secret Dockerfile* High
Plaintext credentials in environment: docker-compose*.yml Critical
.env file with real values .env* High

Read the full file on GitHub · 264 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. 4d ago First seen · 264 lines · 28 tokens per session scan A c719d9adff57

Subscribe to this mod's changes

docker-security-agent is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 18d ago), licensed MIT. It adds 28 tokens to every session and 2,101 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.