docker-compose-reviewer · v1.0.0 · 2026-11-13 · sha256 8e531248c72b9cd9
docker-compose-reviewer v1.0.0A
Immutable. This exact content never changes and is served at /api/v1/blob/8e531248c72b9cd9.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_bwefsqfarhuvyzxz/8e531248c72b9cd9e474ff6dbf05328fe0c01c88b46200a4c10ea887aa280832.json
Then /plugin install docker-compose-reviewer@markdownregistry-bwefsqfarhuvyzxz in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
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.