Back to skill

Security audit

Docker Operations

Security checks for vulnerabilities and agentic risk

Overview

This Docker guide is not malicious, but it needs review because it documents powerful deletion and login workflows without enough safety controls.

Review this skill before installing on any machine with important Docker resources. Require explicit approval before prune, rm, rmi, compose down -v, force flags, volume deletion, pushes, or privileged execution; use password-stdin or a credential helper for registry login; verify registry names; and prefer trusted, pinned images.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
references/registry.md:29
Finding

Registry credentials may be exposed through command-line arguments

Content
View full analysis
-p ``` ### Technical Analysis The documentation presents Docker's `-p`/`--password` option as an actionable non-interactive login example. If an Agent substitutes an actual password or personal access token into this command, the secret becomes part of the command line. Command-line secrets may be exposed through: - Shell history files - Process listings and process-monitoring utilities - Terminal session recordings - CI/CD command logs - Debugging or telemetry systems that capture executed commands - Agent execution transcripts Although the same file recommends `--password-stdin`, retaining the insecure example can still cause an Agent or user to select the unsafe alternative. The placeholder is not itself a real secret, but the documented usage pattern becomes vulnerable when populated with operational credentials. ### Attack Path 1. A user asks the Agent to authenticate to a Docker registry non-interactively. 2. The Agent follows the example at line 29 or line 109. 3. The Agent substitutes a real registry password or token into the `-p` argument. 4. The command is recorded in shell history, logs, telemetry, or a process-monitoring system. 5. A local user or log reader retrieves the exposed credential. 6. The attacker authentic ...[truncated 727 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/cleanup.md:120
Finding

Force-prune examples can cause broad Docker resource and persistent-data deletion without confirmation

Content
View full analysis
Remediation
View remediation
Never execute Docker prune, forced removal, volume deletion, or Compose volume removal without showing the exact command and affected scope and receiving explicit user confirmation. 9. On shared or production daemons, refuse broad force-prune operations unless the user confirms authorization for all daemon-managed projects. 10. After approval, execute the least destructive command that satisfies the request and report exactly which resources were removed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (68)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 40)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 42)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 45)May include surrounding context.

md
| `docker create` | Create container without starting | [references/container-lifecycle.md](references/container-lifecycle.md) |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

Scanner excerpt · references/advanced-image-operations.md (reported line 16)May include surrounding context.

docker image save : -o /tmp/image.tar mkdir -p ./image-contents tar -xf /tmp/image.tar -C ./image-contents rm /tmp/image.tar

text

### Method 2: Using docker run with volume mount

Privileged Container / Container Escape

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Potential security issue detected. Manual review is recommended.

Content

Scanner excerpt · references/container-interaction.md (reported line 21)May include surrounding context.

md
| `-e, --env list` | Set environment variables |
| `--env-file list` | Read in a file of environment variables |
| `-i, --interactive` | Keep STDIN open even if not attached |
| `--privileged` | Give extended privileges to the command |
| `-t, --tty` | Allocate a pseudo-TTY |
| `-u, --user string` | Username or UID (format: "<name|uid>[:<group|gid>]") |
| `-w, --workdir string` | Working directory inside the container |

Untrusted Container Image

High
Category
Supply Chain
Confidence
95% confidence
Finding

Documenting --disable-content-trust as a normal option without warning can encourage users to skip image verification, weakening supply-chain protections. In a Docker operations reference, this is especially risky because the skill directly guides image execution workflows where trust and provenance matter.

Content

Scanner excerpt · references/container-lifecycle.md (reported line 37)May include surrounding context.

md
| `--device-read-iops list` | Limit read rate (IO per second) from a device |
| `--device-write-bps list` | Limit write rate (bytes per second) to a device |
| `--device-write-iops list` | Limit write rate (IO per second) to a device |
| `--disable-content-trust` | Skip image verification (default true) |
| `--dns list` | Set custom DNS servers |
| `--dns-option list` | Set DNS options |
| `--dns-search list` | Set custom DNS search domains |

Untrusted Container Image

High
Category
Supply Chain
Confidence
95% confidence
Finding

Including --disable-content-trust in the docker run options list without caution normalizes bypassing image verification before execution. Since running unverified containers can expose the host and data to malicious or compromised images, the context raises the severity above a generic documentation issue.

Content

Scanner excerpt · references/container-lifecycle.md (reported line 149)May include surrounding context.

md
| `--device-read-iops list` | Limit read rate (IO per second) from a device |
| `--device-write-bps list` | Limit write rate (bytes per second) to a device |
| `--device-write-iops list` | Limit write rate (IO per second) to a device |
| `--disable-content-trust` | Skip image verification (default true) |
| `--dns list` | Set custom DNS servers |
| `--dns-option list` | Set DNS options |
| `--dns-search list` | Set custom DNS search domains |

Untrusted Container Image

High
Category
Supply Chain
Confidence
90% confidence
Finding

The documentation explicitly presents the --disable-content-trust option for docker pull, which disables image verification. In a Docker operations skill, surfacing this without a warning can normalize pulling unverifiable images, increasing supply-chain risk if users adopt the flag in real environments.

Content

Scanner excerpt · references/image-operations.md (reported line 48)May include surrounding context.

md
| Option | Description |
|--------|-------------|
| `-a, --all-tags` | Download all tagged images in the repository |
| `--disable-content-trust` | Skip image verification (default true) |
| `--platform string` | Set platform if server is multi-platform capable |
| `-q, --quiet` | Suppress verbose output |

Untrusted Container Image

High
Category
Supply Chain
Confidence
85% confidence
Finding

The docker push section documents --disable-content-trust, which skips signing. In context, this can encourage publishing images without provenance protections, reducing consumers' ability to verify authenticity and increasing supply-chain exposure.

Content

Scanner excerpt · references/image-operations.md (reported line 73)May include surrounding context.

md
| Option | Description |
|--------|-------------|
| `-a, --all-tags` | Push all tags of an image to the repository |
| `--disable-content-trust` | Skip image signing (default true) |
| `--platform string` | Push a platform-specific manifest as a single-platform image |
| `-q, --quiet` | Suppress verbose output |

Untrusted Container Image

High
Category
Supply Chain
Confidence
89% confidence
Finding

The build section includes --disable-content-trust, again exposing a mechanism to bypass verification in a high-risk operational context. Because this skill is specifically for Docker operations, users may directly copy commands, making undocumented trust bypass more dangerous than in abstract prose.

Content

Scanner excerpt · references/image-operations.md (reported line 105)May include surrounding context.

md
| `-c, --cpu-shares int` | CPU shares (relative weight) |
| `--cpuset-cpus string` | CPUs in which to allow execution (0-3, 0,1) |
| `--cpuset-mems string` | MEMs in which to allow execution (0-3, 0,1) |
| `--disable-content-trust` | Skip image verification (default true) |
| `-f, --file string` | Name of the Dockerfile (Default is "PATH/Dockerfile") |
| `--force-rm` | Always remove intermediate containers |
| `--iidfile string` | Write the image ID to the file |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/registry.md (reported line 16)May include surrounding context.

md
**Options:**
| Option | Description |
|--------|-------------|
| `-p, --password string` | Password or Personal Access Token (PAT) |
| `--password-stdin` | Take the Password or Personal Access Token (PAT) from stdin |
| `-u, --username string` | Username |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/registry.md (reported line 17)May include surrounding context.

md
**Options:**
| Option | Description |
|--------|-------------|
| `-p, --password string` | Password or Personal Access Token (PAT) |
| `--password-stdin` | Take the Password or Personal Access Token (PAT) from stdin |
| `-u, --username string` | Username |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The container lifecycle section includes deletion operations like docker rm and references image removal capability elsewhere without clarifying that removal may be irreversible and may affect running or recoverable workloads. In a skill meant to guide automation, omission of deletion warnings makes accidental destruction more likely, especially when an agent may translate high-level user intent into direct CLI actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The registry operations section covers docker login, docker push, and related transfer commands without warning about credential exposure, pushing private images to the wrong registry, or leaking sensitive content embedded in images. Because this skill is designed for operational use, lack of guidance around secret handling and publication risk can lead to credential compromise or unintended disclosure of proprietary data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly lists destructive cleanup commands such as docker system prune, docker volume prune, and related removal operations without warning that they can permanently delete containers, images, networks, volumes, and cached build data. In an agent-execution context, presenting these commands as routine options increases the chance of accidental destructive actions that can cause service disruption or irreversible data loss on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The extraction workflows write a full container/image filesystem into local directories without warning about disk consumption, file overwrite risk, permissions, or accidental extraction into sensitive working directories. In a Docker operations skill, users are especially likely to run these commands on large or untrusted images, making host-side disruption and unsafe handling more plausible.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.