T03 · Remote Payload Retrieval and Execution
- Location
lib/docker-utils.sh:201- Finding
Unpinned Remote Container Image Executed with Host-Equivalent Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real Docker deployment helper, but it can make privileged host changes and start a privileged remote container even when the request looks read-only.
Review this carefully before installing. Use only on an isolated host where privileged containers and Docker service changes are acceptable. Do not follow the NOPASSWD: ALL guidance, avoid exposing the published ports to untrusted networks, and require an explicit deploy action with a pinned and verified image before running it.
lib/docker-utils.sh:201Unpinned Remote Container Image Executed with Host-Equivalent Privileges
lib/docker-utils.sh:181Docker Service Is Persistently Enabled Without Explicit Consent
execute.sh:43Natural-Language Intent Is Ignored and Read-Only Requests Trigger Deployment
INSTALL.md:323Documentation Recommends Permanent Root-Equivalent Account Access
lib/docker-utils.sh:252Container Services Are Published on All Host Network Interfaces
lib/lock-utils.sh:8Predictable Shared Temporary Lock Permits Local Deployment Denial of Service
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).
手动卸载:
rm -rf ~/.openclaw/skills/docker-lwops-deployer
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).
手动卸载:
rm -rf ~/.openclaw/skills/docker-lwops-deployer
The document explicitly recommends granting the current user NOPASSWD: ALL sudo access, which is a major privilege expansion unrelated to the narrow need of deploying a local Docker container. If followed, any process running as that user can execute arbitrary root commands without authentication, greatly increasing the blast radius of compromise.
Recommending passwordless sudo without a strong warning normalizes a dangerous configuration that effectively removes an important privilege boundary. In the context of an automation skill, this makes accidental or malicious command execution as root significantly easier.
The pipeline writes an unrestricted sudoers rule directly into /etc/sudoers.d/$USER using elevated privileges, creating a powerful chained privilege-escalation setup. In this deployment-skill context, chaining shell output into privileged file creation is especially dangerous because it normalizes persistent root-equivalent access for convenience.
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
sudo chmod 440 /etc/sudoers.d/$USER
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).
rm -f /tmp/docker-lwops-deployer/deploy.lock
The README documents running the container with --privileged and mounting /sys/fs/cgroup with read-write access under cgroup v2, but does not provide a strong security warning about the host-compromise risk. In this context, these settings materially reduce container isolation and can enable container escape or broad host manipulation if the image is compromised or misbehaves.
The README explicitly documents running the service container with --privileged. In a deployment skill pulling remote images, this is especially dangerous because it grants the container near-host-level access and greatly increases the consequences of a malicious or compromised image.
### 容器配置
- **容器名称**: `lwops_rocky8_image_8.1`
- **启动参数**: `--privileged`(特权模式)
- **cgroup 挂载**: `/sys/fs/cgroup:/sys/fs/cgroup:ro`(v1)或 `:rw`(v2)
- **启动命令**: `/usr/sbin/init`
The troubleshooting guidance tells users to ensure --privileged is used, reinforcing an insecure deployment pattern instead of minimizing privileges. This normalizes a high-risk configuration and can lead users to weaken isolation unnecessarily to make the container work.
**解决方案**:
1. 检查 Docker 日志:`sudo docker logs lwops_rocky8_image_8.1`
2. 检查 cgroup 版本兼容性
3. 确保使用 `--privileged` 参数
### 问题 4:无法访问容器服务
The piped command writes a NOPASSWD sudoers rule, combining shell piping with privileged file modification to establish durable elevated access. This is not just documentation of admin behavior; it is a direct instruction to weaken privilege boundaries in a way that could be abused by any later code execution under that user account.
**解决方案**:
1. 使用 sudo 运行命令
2. 将用户添加到 sudo 组:`sudo usermod -aG sudo $USER`
3. 配置 sudo 无密码:`echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER`
## 📚 相关文档
The skill appears to act mainly as a wrapper around another script while presenting itself as a transparent one-click Docker deployment tool. That indirection reduces auditability and can conceal privileged or destructive operations from users, making trust decisions based on the README unsafe.
The skill appears to act mainly as a wrapper around another script while presenting itself as a transparent one-click Docker deployment tool. That indirection reduces auditability and can conceal privileged or destructive operations from users, making trust decisions based on the README unsafe.
The skill specifies running the container with --privileged, which grants broad device and kernel-interface access and sharply reduces Docker isolation. Combined with cgroup mounting and an externally sourced image, this can expose the host to container escape, persistence, or full-system compromise if the container is malicious or exploited.
### 容器配置
- **容器名称**:`lwops_rocky8_image_8.1`
- **启动参数**:`--privileged`(特权模式)
- **cgroup 挂载**:`/sys/fs/cgroup:/sys/fs/cgroup:ro`(v1)或 `:rw`(v2)
- **启动命令**:`/usr/sbin/init`
The troubleshooting guidance tells users to ensure --privileged is used, normalizing an unsafe configuration as the default fix. This increases the chance that users deploy an overprivileged container even when a narrower, safer configuration might work, amplifying host-compromise risk.
**解决方案**:
1. 检查 Docker 日志:`docker logs lwops_rocky8_image_8.1`
2. 检查 cgroup 版本兼容性
3. 确保使用 `--privileged` 参数
### 问题 4:无法访问容器服务
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).
if ! acquire_lock_with_timeout 300; then
local suggestions='[
"检查是否有僵尸进程占用锁",
"手动删除锁文件: rm -f /tmp/docker-lwops-deployer/deploy.lock",
"等待几分钟后重试"
]'
output_error "LockTimeout" "获取部署锁超时,可能存在死锁" "$suggestions"
The script recommends piping a sudoers rule into 'sudo tee' to grant the current user passwordless root access for all commands. This is a classic privilege-expansion pattern that can permanently lower system security and greatly increase the blast radius of any later account compromise.
output_progress "检查权限..."
if ! require_root; then
local suggestions='["使用 sudo 运行此脚本", "将用户添加到 sudo 组: sudo usermod -aG sudo \$USER", "配置 sudo 无密码: echo \"\$USER ALL=(ALL) NOPASSWD: ALL\" | sudo tee /etc/sudoers.d/\$USER"]'
output_error "PermissionDenied" "需要 sudo 权限来安装和管理 Docker" "$suggestions"
exit 1
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
# 添加 Docker 官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg || {
echo "无法添加 Docker GPG 密钥"
return 1
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
# 添加 Docker 官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg || {
echo "无法添加 Docker GPG 密钥"
return 1
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
# 添加 Docker 官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg || {
echo "无法添加 Docker GPG 密钥"
return 1
Piping network-fetched content directly into a privileged command bypasses an opportunity to validate the downloaded material before it affects system trust configuration. In this context the content becomes a repository signing key, so compromise of the source or transport could enable installation of attacker-controlled packages later.
# 添加 Docker 官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg || {
echo "无法添加 Docker GPG 密钥"
return 1
}
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# 设置 Docker 仓库
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null || {
echo "无法设置 Docker 仓库"
return 1
}
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).
echo "正在为 Arch Linux 系统安装 Docker..."
# 安装 Docker
sudo pacman -S --noconfirm docker || {
echo "无法安装 Docker"
return 1
}
The script launches the container with --privileged and additionally mounts /sys/fs/cgroup from the host, effectively collapsing many container isolation boundaries. In a deployment tool that may pull mutable remote images, this creates a realistic path to host compromise or container escape if the image is malicious or later becomes compromised.
# 启动容器
if sudo docker run -d \
--name "$container_name" \
--privileged \
-p "${host_port1}:80" \
-p "${host_port2}:8081" \
--hostname "$container_name" \
The documentation says the skill will automatically install Docker if absent, but does not clearly foreground that this performs privileged package installation and system-level changes. Users may invoke the skill without understanding it can modify repositories, packages, services, and daemon state on the host.
The uninstall section includes forceful deletion commands such as docker rm -f, docker rmi, and rm -rf without an explicit warning about data loss or irreversible removal. Users may destroy containers, images, and local skill files without realizing recovery may be difficult or impossible.