Back to skill

Security audit

Docker Ops

Security checks for vulnerabilities and agentic risk

Overview

This Docker operations skill is mostly coherent, but it includes high-impact Docker and sudo guidance that can delete data or grant persistent root-equivalent access without enough guardrails.

Review this skill before installing. Use dry-run and explicit confirmation for cleanup, avoid docker compose down -v unless you intend to delete volumes, do not add users to the docker group without administrator approval, and harden any copied Compose templates by requiring real secrets and avoiding public database port exposure.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:146
Finding

Docker Group Recommendation Grants Persistent Root-Equivalent Access

Content
View full analysis
Remediation
View remediation
docker ``` - If Docker group access is operationally required, restrict it to dedicated administrator accounts protected with strong authentication, monitoring, and endpoint hardening. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/compose-patterns.md:12
Finding

Predictable Database Password and Unrestricted Host Port Publication in Compose Pattern

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **`references/compose-patterns.md`** — Docker Compose patterns and recipes

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/compose-patterns.md (reported line 72)May include surrounding context.

start_period: 40s

text

## .env File Template

.env — automatically loaded by docker compose

PORT=3000

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/compose-patterns.md (reported line 74)May include surrounding context.

start_period: 40s

text

## .env File Template

.env — automatically loaded by docker compose

PORT=3000

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill clearly instructs the agent to run shell-based Docker administration commands, but the manifest declares no explicit tool scope or allowed-tools. In an agent environment, this widens ambiguity around what the skill is permitted to execute and increases the chance of unintended or overly broad command execution against the host Docker daemon.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cleanup section documents commands that remove Docker resources, including an aggressive mode that removes volumes and build cache, but does not provide a prominent warning about irreversible data loss. In an agentic context, this is dangerous because cleanup commands are easy to execute mechanically and can delete containers, caches, and persistent data needed for recovery.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

docker compose down -v removes associated volumes, which often contain persistent application data such as databases. Without a clear warning, an operator or agent may treat it as a routine stop command and irreversibly destroy stateful service data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Port conflicts

bash
# Find what's using a port
sudo lsof -i :<port>
docker ps --format '{{.Names}} {{.Ports}}' | grep <port>
# Fix: change port mapping in docker-compose.yml or stop conflicting container

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
77% confidence
Finding

The example uses docker run --rm -v <volume>:/data alpine ... without pinning the utility image to a tag or digest. In a real environment this can pull an unexpected or compromised image, turning a simple volume inspection step into a supply-chain exposure with access to mounted data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

Adding a user to the docker group effectively grants root-equivalent access on many systems because Docker can mount the host filesystem, run privileged containers, and control the daemon. Presenting this as a routine fix without warning understates the privilege escalation implications.

Content

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

Permission errors

bash
# Add user to docker group
sudo usermod -aG docker $USER && newgrp docker

Resources

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · references/compose-patterns.md (reported line 79)May include surrounding context.

DB_PORT=5432 DB_USER=app DB_PASSWORD=change_me_in_prod NODE_ENV=development

text

## Useful Compose Commands

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/docker-log-inspector.py (reported line 21)May include surrounding context.

python
if since:
        cmd.extend(["--since", since])
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=15)
        return result.stdout + result.stderr
    except subprocess.TimeoutExpired:
        print("⚠️  docker logs timed out", file=sys.stderr)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The image management section includes pruning and image removal commands without clearly warning that local images will be deleted and may require re-pull or rebuild. This is primarily an availability and operational safety issue rather than a direct security exploit, but it can still disrupt deployments and incident response workflows.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/compose-patterns.md:78