tools / mcp audit / rules / docker container with host-level access · v0.1.0 · View source · Edit on GitHub
MCP audit rule · v0.1.0

Docker container with host-level access

Privileged mode, host networking, a root mount or the Docker socket gives the container (and the server in it) control of the host.

  • each server checks
  • 8 test fixtures

high docker-privileged

Flagged

  7           "-i",
  8           "--rm",
  9 >         "--privileged",
 10           "img:1.0"
 11         ]

Fix

Drop the flag and mount only the one directory the server needs, e.g. "-v", "/home/me/project:/work:ro".

Fine

{
  "mcpServers": {
    "s": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/home/me/proj:/work:ro",
        "img:1.0"
      ]
    }
  }
}

References

← All rules

Running agents in production?Qlucent assesses agent permissions and data boundaries. →