Claude Skill

docker-compose-reviewer

Reviews a docker-compose.yml for risky or fragile settings such as unpinned images, privileged containers, secrets in environment values, a mounted Docker socket and host networking. Use when the user asks to check, harden or clean up a compose file before deploying a stack.

LLM Mart · 0 points · 1 views 10 listing impressions 0 install-command copies

#security #devops

Download lethe044-agentskill-kit-skills_docker-compose-reviewer-219c6e5.zip · 3 KB

Install

skills CLI npx skills add https://github.com/Lethe044/agentskill-kit/tree/main/skills/docker-compose-reviewer
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lethe044-agentskill-kit@llmmart
Git git clone https://github.com/Lethe044/agentskill-kit.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lethe044/agentskill-kit collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Docker Compose reviewer

A line based review of a compose file. It needs no YAML library and no Docker installation.

When to use

  • The user asks for a review of docker-compose.yml or compose.yaml.
  • A stack is about to move from a laptop to a server.
  • A compose file contains passwords or tokens and the user is unsure whether that is a problem.

How to run

python scripts/review_compose.py docker-compose.yml

Rules

Rule Level Meaning
DC001 warning image has no tag or uses latest
DC002 warning privileged: true gives the container almost full host access
DC003 warning a secret-looking variable (password, token, secret, API key) has a literal value
DC004 info a port is published on all interfaces
DC005 warning the Docker socket is mounted, which gives the container control over the host
DC006 info no restart policy
DC007 info no healthcheck
DC008 warning network_mode: host removes network isolation

Output

JSON with services (count) and findings, a list of {"service", "line", "rule", "severity", "message"}. The exit code is 1 when there is at least one warning.

After running

  1. Fix DC003 first. Move secrets to an .env file that is not committed, or to Docker secrets, and reference them as ${NAME}.
  2. Pin images to a version. Use a digest (image@sha256:...) for production.
  3. Bind local-only services to 127.0.0.1:PORT:PORT.
  4. Treat DC002 and DC005 as requiring a written reason, not a quick fix.

Limits

The parser reads the common layout (services at two spaces, keys at four). Anchors, merge keys and extends are not followed.

Errors

A missing file exits with code 2.

Files (agentskill-kit)
  • scripts
    • review_compose.py 4.3 KB
      Loading…
  • tests
    • cases.json 1.8 KB
      Loading…
  • SKILL.md 2.2 KB
    ---
    name: docker-compose-reviewer
    description: Reviews a docker-compose.yml for risky or fragile settings such as unpinned images, privileged containers, secrets in environment values, a mounted Docker socket and host networking. Use when the user asks to check, harden or clean up a compose file before deploying a stack.
    license: MIT
    metadata:
      version: 1.0.0
      author: Lethe044
      tags: [docker, docker-compose, devops, security]
    ---
    
    # Docker Compose reviewer
    
    A line based review of a compose file. It needs no YAML library and no Docker installation.
    
    ## When to use
    
    - The user asks for a review of `docker-compose.yml` or `compose.yaml`.
    - A stack is about to move from a laptop to a server.
    - A compose file contains passwords or tokens and the user is unsure whether that is a problem.
    
    ## How to run
    
    ```bash
    python scripts/review_compose.py docker-compose.yml
    ```
    
    ## Rules
    
    | Rule | Level | Meaning |
    | --- | --- | --- |
    | `DC001` | warning | image has no tag or uses `latest` |
    | `DC002` | warning | `privileged: true` gives the container almost full host access |
    | `DC003` | warning | a secret-looking variable (password, token, secret, API key) has a literal value |
    | `DC004` | info | a port is published on all interfaces |
    | `DC005` | warning | the Docker socket is mounted, which gives the container control over the host |
    | `DC006` | info | no `restart` policy |
    | `DC007` | info | no `healthcheck` |
    | `DC008` | warning | `network_mode: host` removes network isolation |
    
    ## Output
    
    JSON with `services` (count) and `findings`, a list of `{"service", "line", "rule", "severity", "message"}`.
    The exit code is 1 when there is at least one warning.
    
    ## After running
    
    1. Fix `DC003` first. Move secrets to an `.env` file that is not committed, or to Docker secrets, and reference them as `${NAME}`.
    2. Pin images to a version. Use a digest (`image@sha256:...`) for production.
    3. Bind local-only services to `127.0.0.1:PORT:PORT`.
    4. Treat `DC002` and `DC005` as requiring a written reason, not a quick fix.
    
    ## Limits
    
    The parser reads the common layout (services at two spaces, keys at four). Anchors, merge keys and
    `extends` are not followed.
    
    ## Errors
    
    A missing file exits with code 2.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.