Skip to main content

Docker environment documentation, security auditing, and safe MCP server

Project description

roustabout

CI Codecov OpenSSF Scorecard License: MIT Python PyPI Ruff

Structured documentation, security auditing, and compose generation for Docker environments.

Roustabout connects to the Docker API, inspects every running container, and produces:

  • Markdown snapshots — complete inventory of images, ports, volumes, networks, env vars, labels
  • Security audits — 18 checks covering socket exposure, secrets in env vars, sensitive ports, missing healthchecks, root containers, and more
  • Compose generation — reconstructs docker-compose.yml from running containers
  • Snapshot diffs — compare two JSON snapshots to see what changed

All output passes through a secret redactor. Environment variables matching configurable patterns are replaced with [REDACTED] before reaching your screen or AI model.

Install

pip install roustabout

# With MCP server support
pip install "roustabout[mcp]"

Quick start

roustabout snapshot                    # document your Docker environment
roustabout audit                       # run security checks
roustabout generate                    # reconstruct a compose file
roustabout diff old.json new.json      # compare snapshots
Full CLI reference
# Snapshot options
roustabout snapshot --show-env --output snapshot.md
roustabout snapshot --format json --output snapshot.json
roustabout snapshot --project mystack

# Audit options
roustabout audit --output audit.md --hide-accepted
roustabout audit --format json
roustabout audit --project mystack

# Generate options
roustabout generate --redact --output docker-compose.yml

# Finding management
roustabout accept docker-socket-watchtower "Watchtower needs socket access"
roustabout false-positive secrets-env-nginx "NGINX_HOST is not a secret"
roustabout resolve stale-image-redis "Updated to redis:7.2"
Example audit output

From a homelab running 48 containers:

$ roustabout audit

# Security Audit

**212 findings:** **5 critical**, **40 warning**, **167 info**

| Severity | Check | Count | Containers |
|----------|-------|-------|------------|
| Critical | privileged-mode | 1 | cadvisor |
| Critical | docker-socket | 4 | cronbox, homeassistant, portainer, watchtower |
| Warning | secrets-in-env | 38 | authentik_server, grafana, mariadb, +14 more |
| Warning | host-pid | 1 | node_exporter |
| Info | no-healthcheck | 35 | adguard, bazarr, freshrss, +30 more |
| Info | running-as-root | 29 | adguard, cadvisor, plex, +24 more |

Findings are grouped by category — each explanation appears once, not per container.

MCP server

Five read-only tools, all auto-redacted:

Tool Description
docker_snapshot Full markdown inventory
docker_audit Security findings
docker_container Single container detail
docker_networks Network topology
docker_generate Compose file generation
roustabout-mcp  # run standalone

Claude Code configuration:

{
  "mcpServers": {
    "roustabout": {
      "command": "roustabout-mcp"
    }
  }
}
Configuration

Create roustabout.toml in your working directory:

show_env = false
show_labels = true
output = "docker-snapshot.md"
docker_host = "tcp://myhost:2375"
redact_patterns = ["my_custom_secret", "internal_token"]

[severity_overrides]
"docker-socket" = "info"
"secrets-env" = "critical"

Default redaction patterns: password, passwd, passphrase, secret, token, api_key, apikey, credential, private_key, access_key, secret_key. URLs with embedded credentials get partial redaction. Known secret formats (AWS keys, GitHub PATs, JWTs, Stripe keys) are caught by value shape regardless of key name.

Security checks
Check Default Severity What it finds
Privileged mode Critical Containers running with --privileged
Docker socket mount Critical Containers with /var/run/docker.sock
Secrets in env vars Warning Env var keys matching secret patterns + value-format detection
Dangerous capabilities Warning SYS_ADMIN, NET_ADMIN, SYS_PTRACE, and other risky caps
Host PID namespace Warning Containers sharing the host PID namespace
Sensitive ports exposed Warning Database, admin, and management ports on 0.0.0.0
Restart loops Warning Containers with restart count > 25
OOM killed Warning Containers killed by the OOM killer
Missing healthcheck Info Containers without health monitoring
Running as root Info Containers without a user directive
Host network mode Info Containers using network_mode: host
Sensitive host mounts Info /etc, /root, or /home mounted from host
No log rotation Info Containers without max-size on json-file/local log driver
No resource limits Info Containers without a memory limit
Missing restart policy Info Containers without restart policy
Stale images Info Untagged or :latest images without pinned digest
Image age Info Container images older than 90 days
Daemon live-restore Info Docker daemon without live-restore enabled
Daemon log rotation Warning Docker daemon using json-file/local without default log rotation

Findings can be triaged with roustabout accept, false-positive, or resolve. State is stored in roustabout.state.toml.

Requirements

  • Python 3.11+
  • Access to a Docker socket (local or remote)

Contributing

Bug reports and pull requests welcome. See CONTRIBUTING.md.

Support

If you find roustabout useful, consider buying us a coffee.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roustabout-0.7.0.tar.gz (121.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roustabout-0.7.0-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

File details

Details for the file roustabout-0.7.0.tar.gz.

File metadata

  • Download URL: roustabout-0.7.0.tar.gz
  • Upload date:
  • Size: 121.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roustabout-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9eca05f95fdd49b45a0535a81b66263cdd3b5e1b688f846684a9a7f14e63e1d0
MD5 94fcd6497d3d85bb691b7aa24d1bb242
BLAKE2b-256 fdf8777ad668df514efa44bcfd6cc674190384dd082bbbd4b9cb219cb7f44b09

See more details on using hashes here.

Provenance

The following attestation bundles were made for roustabout-0.7.0.tar.gz:

Publisher: publish.yml on featurecreep-cron/roustabout

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file roustabout-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: roustabout-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 77.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roustabout-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f16f440ec9f6cefb8ce8aacac3c5f5e82b1b307320930519e72a332e2a77725
MD5 0d5ab1232782ad348e9d90fd6c596ebf
BLAKE2b-256 f8184f71ed940ab68fe060770e88e108eb20c25a98d1a750910d2339de48b2bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for roustabout-0.7.0-py3-none-any.whl:

Publisher: publish.yml on featurecreep-cron/roustabout

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page