portwhy
Scans docker-compose.yml and live Docker port exposure, audits Docker-bypasses-UFW risks, and generates DOCKER-USER/nftables remediation rules.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
portwhy
Cross-platform zero-dependency listening socket tracer, docker-compose.yml static port scanner, and Docker-bypasses-UFW security auditor with SARIF 2.1.0 output and ready-to-apply DOCKER-USER / nftables remediation.
Why Docker Silently Bypasses UFW
flowchart LR
Internet["Public Internet"] --> PREROUTING["iptables PREROUTING NAT"]
PREROUTING -->|"Published Container Port (0.0.0.0:5432)"| DOCKER["DOCKER Chain (BYPASSES UFW INPUT!)"]
PREROUTING -->|"Host Socket"| UFW["UFW INPUT Rules (Enforced)"]
DOCKER --> Guard["Fix: DOCKER-USER DROP or 127.0.0.1 Bind"]Related MCP server: Docker MCP Guardian
Quickstart (Zero Install)
# Audit live listening sockets on Linux (ss/docker/ufw), macOS (lsof), or Windows (netstat)
npx portwhy
# Statically audit docker-compose.yml in CI/CD before deploy
npx portwhy compose docker-compose.yml --fail-on high
# Emit SARIF 2.1.0 for GitHub Code Scanning
npx portwhy compose docker-compose.yml --sarif > portwhy.sarif
# Print ready-to-apply /etc/ufw/after.rules DOCKER-USER or nftables rules
npx portwhy --ufw-fix
npx portwhy --nft-fixMCP Mode & GitHub Action
{ "mcpServers": { "portwhy": { "command": "npx", "args": ["portwhy@1.2.0", "--mcp"] } } }- uses: lostprotocol212/portwhy@v1
with:
compose-file: 'docker-compose.yml'
fail-on: 'high'
sarif-output: 'portwhy.sarif'Interactive auditor + Network Designer export: serversareup.com/tools/docker-ufw-port-auditor.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Audit Dockerfiles for root users, baked-in secrets, curl-pipe-shell and unpinned base images.
Local checks for sudo, systemd, sshd, ufw, and secret leaks before an agent applies them.
Security audit for docker-compose.yml — 25 checks: secrets, privileges, network, volumes, images.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables remote container security monitoring and management through Docker API and SSH connections. Provides real-time container monitoring, security analysis, event tracking, and comprehensive security scanning for containerized environments.MIT
- AlicenseNot gradedqualityBmaintenanceEnables local LLM agents to inspect Docker containers and optionally perform guarded restarts through MCP, with read-only defaults, credential redaction, canonical ID checks, denylists, and bounded daemon timeouts. It provides secure, zero-trust Docker daemon access for MCP clients.102MIT
- AlicenseNot gradedqualityBmaintenanceEnables inspecting local listening ports, process owners, Docker mappings, and local LLM signatures, plus looking up or terminating the process that owns a specific port when write access is allowed. Mutating actions require confirmation and are blocked in dry-run mode.19 npm1MIT
- AlicenseNot gradedqualityFmaintenanceEnables agents to inspect and operate Docker or Podman containers by checking daemon status, listing containers and images, reading logs, executing commands, running throwaway echo containers, and querying compose projects through a FastMCP stdio interface.Apache 2.0