Back to skill

Security audit

Openclaw Setup Service

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real OpenClaw setup helper, but it asks users to run high-impact installation and configuration steps with weak scoping and secret-handling safeguards.

Review this carefully before installing. Use only on a host you control, avoid sharing persistent root credentials, inspect the install script first, prefer a local or pinned installation path, change the gateway host to 127.0.0.1 unless remote access is intentionally protected, and store/enter Telegram bot tokens with owner-only file permissions or a secrets manager.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:43
Finding

Privileged Execution of an Unverified Remote NodeSource Script

Content
View full analysis
/dev/null; then NODE_VER=$(node --version) warn "Node.js 已安装: $NODE_VER" else curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt install -y nodejs log "Node.js 版本: $(node --version)" fi log "npm 版本: $(npm --version)" } ``` The README documents the same installation technique: ```bash # 安装 Node.js install_nodejs() { curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt install -y nodejs node --version npm --version } ``` ### Technical Analysis The installer downloads mutable content from `https://deb.nodesource.com/setup_20.x` and immediately passes the response to Bash. It does not save the artifact for review, pin its contents by cryptographic digest, or verify a detached signature. The documented invocation is `sudo ./install.sh`, meaning the downloaded response is normally executed with root privileges. HTTPS authenticates the connection according to the host's trust store, but it does not provide content pinning or protect against a compromised upstream server, compromised publishing infrastructure, or malicious changes made after this skill was audited. Installing Node.js may legitimately require limited package-manager privileges. However, granting an unverified remote response unrestricted root shell execution exceeds the minimum privilege required for that operation. ### Attack Path 1. A user follows the README and invokes `sudo ./install.sh`. 2. The script requests the mutable NodeSource setup endpoint. 3. An attacker compromises the endpoint, its publishing infrastructure, or another relevant trust component and causes it to return malicious shell commands. 4. The respo ...[truncated 579 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/install.sh:54
Finding

Unpinned Global Package Installation with Root-Level Lifecycle Execution

Content
View full analysis
/dev/null; then warn "pnpm 已安装: $(pnpm --version)" else npm install -g pnpm log "pnpm 版本: $(pnpm --version)" fi } install_openclaw() { log "安装 OpenClaw..." if command -v openclaw &> /dev/null; then warn "OpenClaw 已安装: $(openclaw --version)" else pnpm add -g openclaw log "OpenClaw 版本: $(openclaw --version)" fi } ``` ### Technical Analysis The installer globally installs `pnpm` and `openclaw` without exact version constraints, lockfile enforcement, integrity pinning, or explicit provenance verification. Package resolution therefore depends on mutable registry state at installation time. The README directs users to run the complete script through `sudo`. Package installation hooks and transitive dependency lifecycle scripts may consequently execute with root privileges. Global installation also modifies shared system state rather than isolating the application under a dedicated, unprivileged account. The package names themselves are consistent with the declared functionality; the vulnerability is the unrestricted, unpinned, privileged installation process rather than evidence that the named packages are currently malicious. ### Attack Path 1. An attacker compromises a relevant package publisher, registry account, package release, or transitive dependency. 2. The attacker publishes a malicious version or introduces malicious lifecycle behavior. 3. A user runs the documented installer with `sudo`. 4. `npm install -g pnpm` or `pnpm add -g openclaw` resolves the mutable package version. 5. Installation or lifecycle code runs with the privileges of the installer, normally root. 6. The malicious package can alter the host, ...[truncated 423 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/config.sh:35
Finding

Telegram Bot Token Echoed and Written to a Plaintext Configuration File Without Enforced Permissions

Content
View full analysis
"${CONFIG_FILE}" << EOF # OpenClaw 配置文件 # 版本: 1.0 # 生成时间: $(date '+%Y-%m-%d %H:%M:%S') version: "1.0" # 频道配置 channels: telegram: enabled: true botToken: "${TELEGRAM_TOKEN:-YOUR_BOT_TOKEN}" adminIds: - "${ADMIN_ID:-YOUR_ADMIN_ID}" ``` From `scripts/setup-telegram.sh`: ```bash read -p "请输入 Bot Token: " TOKEN if [[ -z "${TOKEN}" ]]; then echo -e "${RED}✗${NC} Token 不能为空" exit 1 fi # 读取现有配置或创建新的 if grep -q "telegram:" "${CONFIG_FILE}"; then # 更新现有配置 sed -i "s/botToken:.*/botToken: \"${TOKEN}\"/" "${CONFIG_FILE}" echo -e "${GREEN}✓${NC} Token 已更新" else # 添加 Telegram 配置 cat >> "${CONFIG_FILE}" << EOF channels: telegram: enabled: true botToken: "${TOKEN}" ``` ### Technical Analysis Both scripts use ordinary `read -p`, so the Telegram token is visibly echoed while it is entered. It may therefore be exposed to shoulder surfing, terminal recording, remote-support session capture, or command-session logging. The token is stored in plaintext in `~/.openclaw/config.yaml`, but the scripts do not set `umask 077`, create the file with mode `0600`, or validate the final ownership and permissions. File readability consequently depends on the user's environment and any pre-existing file mode. The setup script also interpolates unvalidated token text directly into a `sed` replacement expression and YAML. Characters meaningful to `sed`, replacement strings, quoting, or YAML can corrupt the configuration. No shell command substitution occurs merely from writing the here-document value, but malformed content can change the resulting configuration semanti ...[truncated 1133 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config.sh:68
Finding

OpenClaw Gateway Exposed on All Network Interfaces by Default

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The stated purpose is installation/configuration service, but the detected behavior extends into system inspection, process monitoring, resource reporting, and filesystem inspection of user directories. This mismatch is dangerous because users may consent to setup assistance without realizing the skill can enumerate broader system state and sensitive local files, especially in enterprise or server environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script downloads code from https://deb.nodesource.com/setup_20.x and immediately executes it via bash, giving a remote party the ability to run arbitrary shell commands with the privileges of the installer. If the upstream server, TLS trust chain, mirror path, or delivery process is compromised, the host can be fully compromised during installation.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

Scanner excerpt · templates/config.yaml (reported line 66)May include surrounding context.

yaml
# 禁止执行的命令  
  blockedCommands:
    - "rm -rf /"
    - "dd"
    - ":(){:|:&};:"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

Scanner excerpt · templates/config.yaml (reported line 66)May include surrounding context.

yaml
# 禁止执行的命令  
  blockedCommands:
    - "rm -rf /"
    - "dd"
    - ":(){:|:&};:"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The configuration template binds the service to 0.0.0.0, exposing it on all network interfaces by default. For an installation helper, this broad exposure is unnecessary and can unintentionally make administrative or bot-facing services reachable from untrusted networks, increasing the attack surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to run a privileged installation script that performs package installation and remote script execution, but does not clearly warn about the scope of system changes. This raises the risk of users executing impactful commands without informed consent and amplifies the consequences if the script or dependencies are compromised.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The README explicitly instructs running the installer with sudo, and the installer performs package installation plus execution of remotely fetched setup logic. Privileged execution magnifies the effect of any script error, compromise, or supply-chain issue into full-system impact.

Content

Scanner excerpt · README.md (reported line 223)May include surrounding context.

2. 运行安装

bash
sudo ./install.sh

3. 配置

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The setup process asks for a Telegram bot token and appends it directly into a local config file, but the README provides no warning about the token's sensitivity or storage risks. Bot tokens are credentials; accidental disclosure through shell history, file permissions, backups, or shared accounts can allow unauthorized bot control.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states configuration does not require root, but the documented flow first uses sudo for installation and then relies on scripts that write to ${HOME}/.openclaw. If users continue operating in a privileged or altered environment, configuration can be written under the wrong account or root-owned paths, causing misconfiguration, secret exposure, or later privilege/ownership problems.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
77% confidence
Finding

The skill appears to imply shell-capable operational behavior but does not declare any explicit tool scope or permission boundaries. In a setup/deployment skill that may inspect systems or run installation steps, missing scope declarations can lead to overbroad execution and reduce user visibility into what privileged actions the skill may perform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly asks users to provide server login information with root privileges, but it does not warn about credential sensitivity, recommend temporary credentials, or describe secure handling. Requesting highly privileged access in a commercial service context materially increases the risk of credential theft, misuse, lateral movement, or full server compromise if the process or operator is untrusted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Multiple comments and all displayed status messages are written in Chinese, and the script provides no locale selection or fallback. This can violate language/locale policy when users have not opted into that language and the tool is not clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script interactively collects a Telegram bot token and admin chat ID, then writes them in cleartext to a YAML file under the user's home directory without warning about sensitivity, file permissions, or safer secret-handling options. This increases the risk of credential disclosure through weak local permissions, backups, shell support tooling, or accidental sharing of the config file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This shell script updates apt metadata and installs system packages, which changes the host system state. Although there are progress logs, there is no explicit warning or confirmation before these safety-relevant operations begin, and the comments do not disclose that the script will modify system packages.

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 · scripts/install.sh (reported line 38)May include surrounding context.

sh
install_deps() {
    log "安装系统依赖..."
    apt update
    apt install -y curl git unzip sudo
}

install_nodejs() {

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script collects a Telegram bot token and writes it in plaintext into a user config file without warning, masking, permission checks, or safer secret-handling guidance. Bot tokens are sensitive credentials; if the file is readable by other local users, backed up insecurely, or committed to source control, an attacker could take over the bot and abuse its connected channel access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template explicitly enables command execution capability via allowedCommands and scheduled command entries, which is broader than a setup/configuration service needs and creates an execution surface inside the deployed assistant. In this context, even a nominal allowlist is risky because it includes network-capable tools like curl and file-reading tools like cat, and the scheduler shows the system is designed to run shell commands automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language instructions throughout the file are exclusively in Chinese, and there is no indication that the skill is region-specific or that users may choose another language. This can violate a language/locale policy when a skill effectively forces a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The installation flow includes piping a remote script from deb.nodesource.com directly into bash. This is a classic supply-chain risk: if the remote endpoint, DNS/TLS trust, or distribution path is compromised, arbitrary code executes immediately with elevated privileges during installation.

Content

Scanner excerpt · README.md (reported line 48)May include surrounding context.

md
# 安装依赖
install_deps() {
    apt update
    apt install -y curl git unzip
}

# 安装 Node.js

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language description is entirely Chinese and presents the service without indicating whether other languages are supported or whether Chinese is required. Under the policy, forcing a specific language without user opt-in can be a locale-policy issue unless the restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This shell script prints system information, resource usage, process status, and details about the user's ~/.openclaw directory, which may reveal local environment data. Although it does not transmit or modify data, there is no comment or user-facing notice indicating that these potentially sensitive details will be collected and displayed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

All user-facing strings in the script are in Chinese, including prompts, confirmations, and next-step instructions. This imposes a specific language on users without opt-in or any documented justification for a locale-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script's comments and runtime messages are presented exclusively in Chinese, which imposes a specific language on users. There is no opt-in, alternative locale, or justification that this is a region-specific tool, so it constitutes a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
15% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/install.sh (reported line 38)May include surrounding context.

sh
install_deps() {
    log "安装系统依赖..."
    apt update
    apt install -y curl git unzip sudo
}

install_nodejs() {

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

All user-visible prompts and status messages in the script are written in Chinese, and the script offers no language selection or indication that it is intended only for a Chinese-speaking audience. This can violate a language/locale policy when users are not given a choice or prior notice.

Content

No source excerpt is available for this finding.