Back to skill

Security audit

deploy-docker-auto

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Docker deployment guide, but it asks an agent to perform high-impact production deployment actions without enough safety controls around command parameters, secrets, and service replacement.

Review this skill carefully before using it in production. Only provide trusted deployment values, keep SSH keys and .env contents out of logs and chat, pin Docker images by immutable tag or digest, require a final approval of the exact commands, and prepare rollback or blue-green deployment before stopping the running container.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:28
Finding

Command Injection Through Unvalidated Deployment Parameters

Content
View full analysis
docker build -t <镜像仓库地址>:<镜像标签> -f . docker push <镜像仓库地址>:<镜像标签> ``` The same pattern is used for operations on the remote server: ```bash cd <服务器部署目录> docker pull <镜像仓库地址>:<镜像标签> docker stop tpaip-server && docker rm tpaip-server docker run -d \ --name tpaip-server \ --restart unless-stopped \ -p 8080:8080 \ --env-file .env \ -v ./data:/app/data \ <镜像仓库地址>:<镜像标签> ``` ### Technical Analysis The skill treats user-supplied deployment information as command fragments without specifying any validation, canonicalization, shell escaping, or safe argument-passing requirements. Values such as the project directory, Dockerfile path, image repository, image tag, remote deployment directory, environment-file path, volume mappings, and additional container parameters can therefore cross a command boundary when interpreted by a shell. For example, if a deployment directory or image-tag value contains shell metacharacters such as a semicolon, command substitution, a newline, or a logical operator, an agent that follows the documented template by constructing a shell command may execute the injected expression as a separate command. Quoting alone would not be sufficient unless it is implemented consistently and appropriate to the shell. The safer design is to avoid constructing shell command strings and instead invoke processes with explicit argument arrays after validating each value against its ex ...[truncated 2434 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

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 · SKILL.md (reported line 66)May include surrounding context.

md
--name tpaip-server \
        --restart unless-stopped \
        -p 8080:8080 \
        --env-file .env \
        -v ./data:/app/data \
        <镜像仓库地址>:<镜像标签>
      ```

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs the user to handle SSH access details and .env files without warning that these often contain private keys, passwords, tokens, and other secrets. In a deployment context, failing to call out secrecy requirements increases the chance of credential exposure through logs, terminal history, screenshots, copied commands, or insecure file handling.

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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The instructions tell the operator to stop and remove the existing production container before starting the replacement, but they do not explicitly warn that this causes a service cutover and possible downtime. In a production deployment skill, omission of that warning can lead to avoidable outages or failed upgrades if the new container does not start cleanly.

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.