Back to skill

Security audit

Docker

Security checks for vulnerabilities and agentic risk

Overview

This is a Docker reference skill made of documentation only; its higher-risk Docker examples are disclosed as warnings or labeled cleanup commands rather than hidden behavior.

Install only if you want Docker-focused guidance. Review copied Docker commands before running them, especially port publishing, image pulls, and prune commands; for production, bind local services to 127.0.0.1 when appropriate and pin images by version or digest.

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 (2)

T08 · Insecure Dependencies

Warning
Location
commands.md:21
Finding
Mutable Third-Party Container Image Reference## Vulnerability Details **File Location**: `commands.md:21` **Vulnerability Type**: Unpinned third-party container image **Risk Level**: Medium **Vulnerable Code**: ```bash docker pull nginx:alpine # fetch ``` ### Technical Analysis The command pulls the third-party `nginx` image through the mutable `alpine` tag without specifying a fixed version or verified digest. A mutable tag can resolve to different image contents over time. This undermines image provenance and deployment reproducibility and contradicts the project's own image-pinning guidance. Although using the official NGINX repository reduces risk compared with an unknown publisher, the command does not cryptographically bind the downloaded artifact to content reviewed or approved by the user. Changes made by the publisher, accidental tag replacement, or registry or publisher compromise could cause a subsequent pull to retrieve unexpected image content. ### Attack Path 1. The `nginx:alpine` tag is updated, replaced, or compromised at its registry. 2. A user follows the documented command and pulls the mutable tag. 3. Docker downloads the image currently associated with that tag rather than a previously reviewed artifact. 4. The user starts or deploys a container based on the downloaded image. 5. Any malicious or vulnerable content in the substituted image executes with the container's configured permissions and access. ### Impact Assessment Exploitation requires control over or compromise of the image publication path, or an unsafe upstream image update. Successful exploitation could execute arbitrary code inside the resulting container. The accessible scope would depend on its runtime configuration, including mounted volumes, network access, Linux capabilities, secrets, and access to the Docker socket. This finding does not independently grant host privileges, but an overly privileged runtime configuration could substantially increase ...[truncated 11 chars]
Remediation
## Remediation Suggestions - Replace the mutable tag with an approved, explicit image version. - For security-sensitive or production use, pin the image by a verified SHA-256 digest, for example: ```bash docker pull nginx:1.27.4-alpine@sha256:<verified-digest> ``` - Obtain the digest from a trusted registry and verify the publisher and image provenance before approval. - Use automated image scanning and signature or attestation verification in CI. - Establish a controlled process for reviewing and updating pinned digests so security patches can be adopted without silently changing deployed artifacts.

T09 · Insecure Skill Coding Practices

Warning
Location
commands.md:8
Finding
Docker Service Example Publishes Port on All Host Interfaces## Vulnerability Details **File Location**: `commands.md:8` **Vulnerability Type**: Unsafe default network exposure **Risk Level**: Medium **Vulnerable Code**: ```bash docker run -d --name app -p 8080:80 image # start detached ``` ### Technical Analysis The port-publishing syntax omits a host address. Under normal Docker behavior, `-p 8080:80` publishes the container service on all host interfaces rather than restricting it to the loopback interface. Consequently, a user copying this quick-reference command may expose the application to the local network or Internet, depending on host routing, firewall policy, and cloud security-group configuration. This is an unsafe default for generic documentation because the example does not establish that public exposure is intended or that the service has suitable authentication, transport security, and application hardening. The project recognizes this behavior elsewhere, but its primary lifecycle example does not implement the safer configuration. ### Attack Path 1. A user copies the documented `docker run` command. 2. Docker publishes host port `8080` on all available host interfaces. 3. Network routing and firewall rules permit another system to reach that port. 4. A remote party discovers the exposed service through scanning or prior knowledge. 5. The remote party interacts with the application and may exploit weak authentication, insecure defaults, or application vulnerabilities. ### Impact Assessment The immediate impact is unintended network reachability of the containerized application. The privileges obtainable depend on the application and container configuration. An attacker could potentially access application data, invoke unauthenticated functionality, exploit application vulnerabilities, or execute code inside the container. Further host impact would require additional weaknesses such as privileged execution, dangerous capabilities, sensitive host mounts, expos ...[truncated 47 chars]
Remediation
## Remediation Suggestions - Make loopback-only publication the default in generic examples: ```bash docker run -d --name app -p 127.0.0.1:8080:80 image ``` - Explain that binding to `0.0.0.0` or omitting the host address should occur only when remote access is explicitly required. - Require a firewall or cloud security-group review before exposing a container externally. - For externally reachable services, place the application behind a hardened reverse proxy or ingress layer with TLS, authentication, access controls, and request logging. - Document that users should verify the effective binding with `docker ps`, `docker port app`, and host firewall inspection.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Ae1

High
Category
analysis-evasion
Content
| Compose orchestration | `compose.md` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
### 4. Set Resource Limits
- `-m 512m` on every container
- OOM killer strikes without warning otherwise

### 5. Configure Log Rotation
- Default json-file driver has no size limit
Confidence
80% confidence
Finding
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Credential Access

High
Category
Privilege Escalation
Content
- `ENV SECRET=x` visible en `docker history` y `docker inspect`
- `ARG` para secrets también visible en history — no es seguro
- `COPY secrets.txt` baked en layer — aunque lo borres después, está en layer anterior
- `--env-file` seguro en runtime pero archivo debe protegerse en host

## BuildKit Secrets
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
## Runtime

- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
## Runtime

- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
## Runtime

- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
## Runtime

- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container
Confidence
85% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container

## Network
Confidence
85% confidence
Finding
Potential security issue detected. Manual review is recommended.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
- `--privileged` = acceso completo a host devices, kernel modules, etc.
- `--cap-add SYS_ADMIN` casi tan malo como privileged — evitar
- `-v /:/host` monta root del host = game over si container comprometido
- `--pid=host` permite ver/kill procesos del host desde container

## Network
Confidence
80% confidence
Finding
Potential security issue detected. Manual review is recommended.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill explicitly says it should be applied directly whenever Docker work appears, which creates overly broad, default-on activation behavior. In an agent system, broad auto-invocation expands the attack surface and can cause the agent to follow Docker-oriented guidance in situations where more constrained or security-reviewed behavior would be safer.

Unbounded Output

Medium
Category
Output Handling
Content
- OOM killer strikes without warning otherwise

### 5. Configure Log Rotation
- Default json-file driver has no size limit
- One chatty container fills disk and crashes host

## Image Traps
Confidence
75% confidence
Finding
Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

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
92% confidence
Finding
Using 'nginx:alpine' relies on a mutable tag rather than an immutable digest, so the content pulled can change over time without the command changing. In a Docker skill that users may copy directly into real environments, this increases supply-chain and reproducibility risk because a later pull could retrieve a different image, including one with newly introduced vulnerabilities or unexpected behavior.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The instructional content is entirely written in Spanish, while the file provides no indication that Spanish is optional or that this skill is intentionally limited to a Spanish-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The instructional content is written in Spanish throughout, including operational guidance and warnings, with no indication that the skill is intentionally limited to Spanish-speaking users or that another language option exists. Under the policy, a fixed language choice without opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The instructional content is written entirely in Spanish, but the file does not indicate that Spanish is optional, user-selected, or required for a region-specific purpose. This can violate language/locale policy when a skill implicitly forces a specific language on users without opt-in.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The markdown content is written entirely in Spanish/Spanglish and provides no indication that language selection is optional or that the skill is intended only for Spanish-speaking users. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
## Size Traps

- `rm -rf /var/lib/apt/lists` en RUN separado = espacio no recuperado (layers)
- `npm install --production` después de `npm install` = dev dependencies todavía en layer anterior
- `.git` copiado = megas extra si no hay .dockerignore
- Múltiples `RUN apt-get` = cada uno es layer con cache de apt
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
## Size Traps

- `rm -rf /var/lib/apt/lists` en RUN separado = espacio no recuperado (layers)
- `npm install --production` después de `npm install` = dev dependencies todavía en layer anterior
- `.git` copiado = megas extra si no hay .dockerignore
- Múltiples `RUN apt-get` = cada uno es layer con cache de apt
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
## Size Traps

- `rm -rf /var/lib/apt/lists` en RUN separado = espacio no recuperado (layers)
- `npm install --production` después de `npm install` = dev dependencies todavía en layer anterior
- `.git` copiado = megas extra si no hay .dockerignore
- Múltiples `RUN apt-get` = cada uno es layer con cache de apt
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.