T08 · Insecure Dependencies
- Location
scripts/deploy.js:217- Finding
Unpinned Third-Party Code Is Downloaded and Executed During Deployment
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed production deployment guide, but it combines persistent service setup, broad network exposure, unpinned installs, and unsafe/incomplete scripts that users should review before use.
Review and repair the package before installing. Pin exact OpenClaw versions, avoid running unreviewed latest/default-branch code, default the web UI to localhost unless TLS and firewall allowlists are configured, protect token files with restrictive permissions, and replace the systemd installer with a dedicated gateway service that does not rerun the deployment script.
scripts/deploy.js:217Unpinned Third-Party Code Is Downloaded and Executed During Deployment
scripts/deploy.js:499Predictable Temporary File Is Copied into a Privileged Systemd Location
scripts/deploy.js:298Generated Authentication Token Is Stored Without Explicit Restrictive Permissions
scripts/deploy.js:350Production Web Interface Is Exposed on All Network Interfaces over Plain HTTP
scripts/deploy.js:474Systemd Service Executes the Interactive Deployment Script Instead of the Gateway
Referenced artifact was not completely inspected
node scripts/deploy.js
Referenced artifact was not completely inspected
node scripts/step1-environment.js
Referenced artifact was not completely inspected
node scripts/step1-environment.js
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- openclaw-service.xml -->
<service>
<id>OpenClawGateway</id>
<name>OpenClaw Gateway</name>
The troubleshooting section instructs users to disable gateway authentication and restart the service, with only a brief parenthetical note, which is insufficient for a production guide. If applied on a reachable service, this can expose the dashboard and API to unauthorized access, data disclosure, and service abuse.
The generated Windows/Linux service definitions use process.execPath with require.main.filename, which points to the deployment script itself rather than the intended OpenClaw gateway/service binary. This can cause persistent execution of the installer logic at boot, leading to repeated privileged changes, unintended reinstall/reconfiguration loops, and a much larger execution surface than the advertised service.
The skill directs users to run deployment and service-configuration scripts that can install software, register system services, and enable autostart, but it does not clearly warn that these actions will modify the host system. In an agent context, missing pre-execution warnings and confirmation requirements can lead to unintended persistent changes, especially on production machines.
The backup restore instructions tell the user to restore from a backup file but do not warn that restoration may overwrite current configuration or state. This can cause accidental loss of newer settings or data if used without validation, version checks, or a backup of the current state.
The emergency recovery section includes a direct copy command that replaces the active config file with a backup, without warning that the current configuration will be overwritten. In production, this can immediately revert security settings, break environment-specific configuration, or discard recent operational changes.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 或浏览器访问: http://localhost:18789
# 测试聊天功能
curl -X POST http://localhost:18789/api/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "你好,测试生产环境"}'
The production config explicitly binds the gateway to 0.0.0.0, exposing the service to all network interfaces, while the surrounding guidance does not prominently warn that this increases attack surface. In a production setup guide, readers may copy this default directly, unintentionally making the chat/API endpoint reachable from untrusted LAN segments or port-forwarded environments.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
#### macOS launchd服务
```xml
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
```xml
<!-- ~/Library/LaunchAgents/com.openclaw.gateway.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Linux: 检查systemd服务
systemctl status openclaw.service
systemctl enable openclaw.service # 重新启用
# 检查启动依赖
# 确保网络服务在OpenClaw之前启动
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 检查防火墙
# Windows: 允许端口18789通过防火墙
# Linux: sudo ufw allow 18789/tcp
# 检查网络配置
ping [目标IP]
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 检查防火墙
# Windows: 允许端口18789通过防火墙
# Linux: sudo ufw allow 18789/tcp
# 检查网络配置
ping [目标IP]
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 检查防火墙
# Windows: 允许端口18789通过防火墙
# Linux: sudo ufw allow 18789/tcp
# 检查网络配置
ping [目标IP]
This code file clearly warns that it will install to production and register a service, but its user-facing deployment summary does not explicitly disclose that it will write configuration files under the user's home directory, create service definitions, and enable automatic startup. Those are safety-relevant persistent changes, and SQP-2 applies because the script performs them later via fs.writeFileSync and service registration commands.
The script executes npx -y openclaw@latest without pinning to a specific version or verifying provenance. In a deployment script that may run with elevated privileges, this creates a supply-chain risk where a compromised or unexpected package version can be fetched and executed immediately.
The script copies a service file into /etc/systemd/system and runs sudo systemctl enable/start, which are privileged and persistence-related operations. Although earlier text mentions root privileges for service registration, there is no targeted confirmation or explicit user-facing warning immediately before these commands execute.
Detected: suspicious.dangerous_exec