Back to skill

Security audit

Docker Pilot

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Docker administration guide, but it contains unsafe host-level Docker advice and a first-run checklist that could make broad persistent changes without clear per-action approval.

Review this skill before installing. Do not follow the tcp://0.0.0.0:2375 Docker daemon advice. Treat the first-run setup as a menu of proposals, not automatic setup: require explicit approval for each install, daemon.json change, prune, restart-policy change, and any cron job.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:483
Finding
Unauthenticated Docker API Exposed on All Network Interfaces## Vulnerability Details **File Location**: `SKILL.md:483-486` **Vulnerability Type**: Unauthenticated remote Docker daemon exposure **Risk Level**: High **Vulnerable Code:** ```text # Container can't reach host # Use host.docker.internal (Docker Desktop) or host IP # On Linux: add to /etc/docker/daemon.json: # {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]} ``` ### Technical Analysis The Skill recommends configuring Docker to listen on plaintext TCP port 2375 on `0.0.0.0`, which makes the Docker API available through every host network interface. The configuration does not enable TLS, client authentication, authorization, or network-level restrictions. Access to the Docker daemon is effectively equivalent to root-level host access. A client that can reach this endpoint can instruct Docker to create a privileged container, mount sensitive host directories, access container secrets, manipulate existing workloads, or execute commands affecting the host. This configuration is also unnecessary for the stated objective of allowing a container to communicate with a service on the host. ### Attack Path 1. A user or Agent follows the Skill and adds the recommended `tcp://0.0.0.0:2375` listener to `/etc/docker/daemon.json`. 2. Docker is restarted or reloaded, exposing its unauthenticated API to all reachable networks. 3. An attacker scans for or otherwise discovers TCP port 2375. 4. The attacker calls the Docker API without credentials. 5. The attacker creates a privileged container or mounts the host root filesystem into a controlled container. 6. The attacker reads or modifies host files, executes host-level commands, steals credentials, disrupts workloads, or establishes persistence. ### Impact Assessment A reachable attacker may obtain effective root-equivalent control over the Docker host. The affected scope includes all containers, images, networks, volumes, mounted secrets, and potentially the ...[truncated 189 chars]
Remediation
## Remediation Suggestions - Remove the recommendation to bind an unauthenticated Docker endpoint to `0.0.0.0:2375`. - For container-to-host communication, prefer `host.docker.internal`. On Linux, use Docker's `host-gateway` mapping where appropriate: ```bash docker run --add-host=host.docker.internal:host-gateway ... ``` - Alternatively, expose only the required host service on a narrowly scoped interface or dedicated Docker network. - If remote Docker API access is operationally required: - Bind it only to a trusted management interface. - Require mutual TLS and validate client certificates. - Restrict access with host and perimeter firewall rules. - Place an authorization proxy in front of the daemon where feasible. - Monitor and alert on Docker API access. - Explicitly warn that unauthenticated port 2375 must never be exposed to an untrusted network.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:769
Finding
First-Run Workflow Bypasses the Skill's Confirmation Controls## Vulnerability Details **File Location**: `SKILL.md:769-779` **Vulnerability Type**: Unapproved fleet-wide state modification **Risk Level**: Medium **Vulnerable Code:** ```text ## First-Run Setup When this skill is activated for the first time on a new machine: 1. **Check compose:** `docker compose version` — if missing, install it 2. **Scan fleet:** `docker ps -a` + `docker system df` — understand current state 3. **Set restart policies:** `docker update --restart=unless-stopped` for all running containers 4. **Configure log rotation:** Add max-size/max-file to daemon.json or per-container 5. **Clean up:** Run safe cleanup (image prune, container prune, builder prune) 6. **Build service map:** Document what each container does 7. **Set up monitoring:** Consider a cron to check fleet health periodically ``` ### Technical Analysis The first-run workflow instructs the Agent to perform broad state-changing actions merely because the Skill has been activated. These actions include installing software, changing restart policies for every running container, modifying daemon-wide logging configuration, pruning Docker resources, and potentially creating a persistent cron task. This conflicts with the Skill's own safety architecture, which states that state-changing operations must be preceded by an impact assessment and user confirmation. The first-run section does not require enumeration of affected resources, object-level approval, or separate confirmation for each category of change. Although image, container, and builder pruning are described as “safe cleanup,” they still delete local objects. For example, container pruning removes stopped containers, which may be needed for investigation or recovery, while builder pruning can remove useful build cache. Fleet-wide restart-policy changes can cause workloads to return after reboot even when that behavior was not intended. ### Attack Path 1. The Skill is activated o ...[truncated 1111 chars]
Remediation
## Remediation Suggestions - Make first-run behavior read-only by default. Limit automatic actions to inventory commands such as `docker ps -a` and `docker system df`. - Treat installation, configuration changes, policy updates, pruning, and scheduled-task creation as separate operations. - Before each state-changing action: 1. Enumerate the exact containers, files, images, caches, or schedules affected. 2. Explain expected downtime, persistence, and deletion effects. 3. Display the exact proposed command or configuration diff. 4. Obtain explicit user confirmation. - Never apply restart-policy changes to all containers as an implicit setup step. - Back up and validate `/etc/docker/daemon.json` before proposing modifications. - Show the complete list of prune candidates and obtain confirmation before deleting them. - Do not create cron jobs unless explicitly requested. Present the exact command, schedule, execution user, output destination, and removal procedure before installation.

T08 · Insecure Dependencies

Note
Location
SKILL.md:17
Finding
Companion Skill Is Installed Without Version or Integrity Pinning## Vulnerability Details **File Location**: `SKILL.md:17-21` **Vulnerability Type**: Unpinned third-party Skill dependency **Risk Level**: Low **Vulnerable Code:** ```text ## Companion Skills This skill **extends** the existing ClawHub `docker` skill (v1.0.4 by ivangdavila). Install both for full coverage: - `clawhub install docker` — Dockerfile patterns, image building, security hardening reference - `clawhub install docker-pilot` — Operational management, safety rails, fleet view, troubleshooting ``` ### Technical Analysis The documentation identifies version `1.0.4` as the expected companion Skill but instructs users to install it only by the mutable name `docker`. No version constraint, publisher verification step, or integrity digest is included. A mutable package name may resolve to content different from the version reviewed by the project author. If the registry entry, publisher account, package ownership, or future release is compromised, users may install altered instructions or executable content under the trust granted to the expected Docker Skill. The audited project does not prove that the referenced dependency is currently malicious. The vulnerability is the absence of controls ensuring that installation retrieves the specifically reviewed artifact. ### Attack Path 1. The companion Skill receives a malicious or compromised update, or its registry ownership is taken over. 2. A user follows the documented `clawhub install docker` command. 3. The package manager resolves the mutable name to the altered latest release rather than the stated reviewed version. 4. The installed Skill is loaded with the permissions and trust associated with Docker administration. 5. Malicious instructions or code in that dependency may then influence Agent behavior or access Docker-managed resources. ### Impact Assessment Impact depends on the capabilities and content of a compromised dependency. Because the companion ...[truncated 305 chars]
Remediation
## Remediation Suggestions - Pin the companion Skill to the exact reviewed version, such as `1.0.4`, using the package manager's supported version syntax. - Where supported, verify an immutable artifact digest or signature in addition to the version. - Verify the expected publisher identity before installation. - Document the reviewed version and integrity value in project metadata. - Avoid automatic dependency upgrades; review release changes before updating the pin. - Make the companion Skill optional unless its functionality is strictly required.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Content
system prune -a           # Removes ALL unused images — full audit required
docker system prune --volumes    # Removes unused volumes — DATA LOSS
docker compose down -v           # Destroys volumes — triple confirm
docker network rm NETWORK        # Breaks attached containers — show list
docker rm -f CONTAINER           # Force-remove running container — dangerous
docker exec CONTAINER rm -rf /   # Destructive inside container — catch pattern
docker swarm leave --force       # Dissolves swarm — catastrophic
```

**Confirmation pattern:**
```
⚠️ DESTRUCTIVE OPERATION
Will remove: [list items]
Impact: [data loss / service disruption / etc.]
Type "confirm" to proceed:
```

### 🛡️ Protected Services

Some services are critical infrastructure. **Never stop, restart, or remove these without explicit override:**

```yaml
# Default protected services (customize per deployment)
protected_services:
  - adguardhome      # DNS for entire network — stopping breaks internet
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Docker Socket Access

High
Category
Privilege Escalation
Content
# Container can't reach host
# Use host.docker.internal (Docker Desktop) or host IP
# On Linux: add to /etc/docker/daemon.json:
#   {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}

# DNS not resolving in container
docker exec CONTAINER cat /etc/resolv.conf
Confidence
95% confidence
Finding
The guidance suggests adding `tcp://0.0.0.0:2375` to Docker's daemon hosts, which exposes the Docker API over an unauthenticated network socket unless additional controls are configured. That can allow remote container management and effectively host-level compromise, because Docker socket access is equivalent to root on the host.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
### NEVER Do These

- ❌ `docker run --privileged` — disables ALL security
- ❌ `-v /:/host` — mounts entire host filesystem
- ❌ `--pid=host` — can see/kill host processes
- ❌ `--network=host` on non-DNS containers — unnecessary exposure
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
### NEVER Do These

- ❌ `docker run --privileged` — disables ALL security
- ❌ `-v /:/host` — mounts entire host filesystem
- ❌ `--pid=host` — can see/kill host processes
- ❌ `--network=host` on non-DNS containers — unnecessary exposure
- ❌ Secrets in ENV or ARG — visible in `docker inspect` and `docker history`
Confidence
85% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
- ❌ `docker run --privileged` — disables ALL security
- ❌ `-v /:/host` — mounts entire host filesystem
- ❌ `--pid=host` — can see/kill host processes
- ❌ `--network=host` on non-DNS containers — unnecessary exposure
- ❌ Secrets in ENV or ARG — visible in `docker inspect` and `docker history`
- ❌ `docker rm $(docker ps -aq)` — chained destructive command
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
- ❌ `docker run --privileged` — disables ALL security
- ❌ `-v /:/host` — mounts entire host filesystem
- ❌ `--pid=host` — can see/kill host processes
- ❌ `--network=host` on non-DNS containers — unnecessary exposure
- ❌ Secrets in ENV or ARG — visible in `docker inspect` and `docker history`
- ❌ `docker rm $(docker ps -aq)` — chained destructive command
- ❌ `docker system prune -a` without audit first
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Vague Triggers

Medium
Confidence
95% confidence
Finding
Declaring this as the default skill for any Docker-related work broadens activation beyond narrowly intended use and increases the chance an agent will apply operational commands in contexts that only need analysis or minimal inspection. Overbroad scope raises the risk of unintended state-changing actions, especially because the skill contains many lifecycle and cleanup commands.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
docker compose version 2>/dev/null || echo "NOT INSTALLED"

# Install compose plugin (no daemon restart needed)
sudo apt install docker-compose-v2

# Verify
docker compose version
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The skill claims health checks can be added to existing containers via `docker update`, while also noting recreation is required. This contradiction can cause operators or downstream agents to rely on a non-working control, leaving containers without expected health monitoring and potentially masking service failures.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# 1. Check network
curl -I https://registry-1.docker.io/v2/

# 2. Check auth
docker login
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The first-run setup recommends bulk restart-policy changes for all running containers without requiring per-service review or warning about operational side effects. This can alter recovery behavior, restart intentionally ephemeral containers, or interfere with existing orchestration assumptions.

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
docker compose down -v           # Destroys volumes — triple confirm
docker network rm NETWORK        # Breaks attached containers — show list
docker rm -f CONTAINER           # Force-remove running container — dangerous
docker exec CONTAINER rm -rf /   # Destructive inside container — catch pattern
docker swarm leave --force       # Dissolves swarm — catastrophic
```
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
docker compose down -v           # Destroys volumes — triple confirm
docker network rm NETWORK        # Breaks attached containers — show list
docker rm -f CONTAINER           # Force-remove running container — dangerous
docker exec CONTAINER rm -rf /   # Destructive inside container — catch pattern
docker swarm leave --force       # Dissolves swarm — catastrophic
```
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
docker volume prune
# ⚠️ CONFIRM: "This deletes volume data. Show volume contents first."
# Before: docker volume inspect VOLUME_NAME
# Show contents: docker run --rm -v VOLUME_NAME:/mnt alpine ls -la /mnt

# Nuclear option
docker system prune -a --volumes
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
- Multi-stage: forgotten `--from=builder` copies from wrong stage silently
- `COPY . .` before `RUN npm install` = cache invalidated on every code change
- `ADD` extracts archives automatically — use `COPY` unless you need extraction
- `rm -rf /var/lib/apt/lists` in separate RUN = space not reclaimed (layers)
- `.git` copied = megabytes of bloat — use `.dockerignore`

### ARG vs ENV
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Static analysis

No suspicious patterns detected.