T03 · Remote Payload Retrieval and Execution
- Location
docs/user_guide.md:101- Finding
Remote Installation Script Executed Directly with Root Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s core WeChat draft-publishing behavior is coherent, but its documentation and code handle credentials and privileged installation in ways users should review carefully before installing.
Install only if you are comfortable giving the skill WeChat public-account API credentials and allowing it to create drafts, including on a schedule. Prefer secure secret storage over command-line, hardcoded, or plaintext examples; protect any config and token-cache files with owner-only permissions; avoid the documented curl-to-sudo and sudo npm install paths unless you independently trust and verify them; test on a non-production account before enabling daily automation.
docs/user_guide.md:101Remote Installation Script Executed Directly with Root Privileges
scripts/publish.py:167WeChat Access Token Cached in a Plaintext File Without Enforced Permissions
docs/user_guide.md:105Unpinned Global Package Installation with Elevated Privileges
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
for i in range(1, retry_count + 1):
try:
self.logger.info(f"获取 Token(尝试 {i}/{retry_count})")
response = requests.get(token_url, params=params, timeout=30)
response.raise_for_status()
result = response.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
for i in range(1, retry_count + 1):
try:
self.logger.info(f"创建草稿(尝试 {i}/{retry_count})")
response = requests.post(
draft_url,
params=params,
json=data,
The troubleshooting guide explicitly recommends hardcoding a live AppID and AppSecret into scripts and config files. This materially increases the chance of credential leakage through source control, local backups, screenshots, logs, or multi-user systems, and it normalizes insecure secret handling in operational guidance.
The document advises storing the AppSecret directly in script source and plaintext config without any warning about exposure risk. Even if meant as troubleshooting guidance, this encourages unsafe practices that can lead to account compromise if the secret is copied, shared, committed, or read by other local processes/users.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
# Windows 防火墙
netsh advfirewall firewall show rule name=all | findstr "WeChat"
This is a classic dangerous command chain: a network fetch piped directly into sudo bash. The chain removes opportunities for user inspection and combines remote content retrieval with immediate privileged execution, making compromise fast and severe.
# 1. 打开终端
# 2. 安装 Node.js(如未安装)
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# 3. 安装 OpenClaw
Line L108 states '全部中文,无英文', which is a natural-language locale restriction that applies uniformly rather than as an optional preference. This matches the policy-violation category because it forces a specific language without documenting user choice or a justified regional constraint.
The guide includes a full AppSecret in configuration and status output examples, which normalizes exposing a credential in plaintext on screen and in documentation. Readers may reuse real secrets in similar contexts, leak them through shell history, screenshots, logs, or copied support requests, enabling unauthorized access to the WeChat account API.
The guide instructs users to schedule daily publishing at 06:00 without clearly warning that this enables unattended, recurring remote actions against their WeChat account. Users may not understand that once enabled, the skill will continue operating automatically and could post unwanted or incorrect content if misconfigured or compromised.
The installation guide presents --test as a harmless test step, but the sample output shows it creates a real remote draft in the user's WeChat account. Without a prominent warning, users may trigger external side effects on production accounts unintentionally, potentially publishing or staging content they did not intend to create.
The file is a markdown document, so SQP-3 applies. The title and content prescribe a WeChat public-account publishing process entirely in Chinese and fix the locale/timezone to East Asia context, but do not indicate that this language/locale is optional or user-selected; this can violate the policy against forcing a specific language or locale without opt-in.
The lines '全部中文,无英文' and '自动翻译英文新闻' impose a fixed language policy on all users. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly justified, which this document does not provide.
The diagnostic script reads the AppSecret from disk and prints part of it to the console, confirming both the location and value prefix of a sensitive credential. Partial disclosure still leaks secret material and can expose credentials via terminal history, logs, screenshots, or remote support sessions.
The guide describes fully automatic daily publishing to a WeChat draft box on the user's behalf, but does not prominently warn users that the skill will perform account actions automatically once configured. In a skill that operates with app_secret and scheduled execution, lack of explicit consent/confirmation messaging increases the risk of unintended postings, reputational harm, and surprising account activity.
The documentation states that all news content must be in Chinese and that English news is automatically translated. This is a language-policy constraint presented as mandatory behavior, with no indication that users can choose another language or explicitly opt into this locale restriction.
The command curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - pipes a remote script directly into a root shell. This is dangerous because any compromise of the remote endpoint, TLS interception, or script change results in immediate arbitrary code execution with elevated privileges.
# 1. 打开终端
# 2. 安装 Node.js(如未安装)
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# 3. 安装 OpenClaw
The command curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - pipes a remote script directly into a root shell. This is dangerous because any compromise of the remote endpoint, TLS interception, or script change results in immediate arbitrary code execution with elevated privileges.
# 1. 打开终端
# 2. 安装 Node.js(如未安装)
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# 3. 安装 OpenClaw
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 1. 打开终端
# 2. 安装 Node.js(如未安装)
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# 3. 安装 OpenClaw
sudo npm install -g openclaw
The guide recommends sudo npm install -g openclaw, which installs a package globally with root privileges. If the package or its dependency chain is compromised, arbitrary code would execute as root during installation, amplifying supply-chain risk.
sudo apt-get install -y nodejs
# 3. 安装 OpenClaw
sudo npm install -g openclaw
# 4. 验证安装
openclaw --version
The guide instructs users to place the WeChat AppSecret directly on the command line and in a plaintext configuration file. This exposes a long-lived credential to shell history, process listings, backups, and accidental disclosure, which could allow unauthorized access to the WeChat public account API.
Passing AppSecret as a CLI argument can leak it through shell history, terminal logging, process monitors, or multi-user system process listings. Because this secret grants API access to the user's WeChat account integration, disclosure can lead to unauthorized publishing or account misuse.
The manual directs users to save AppSecret in a plaintext JSON file without an upfront security warning or default protection mechanism. Plaintext credential storage increases the chance of theft via local compromise, backups, sync tools, malware, or accidental sharing of the skill directory.
The document is for a WeChat public account publishing skill, but a substantial section describes buying, activating, and inspecting a commercial license, including payment flow and activation codes. For an unknown-purpose skill, monetization and license-management capabilities are not inherently justified by the core operational purpose of publishing content.
Recommending sudo npm install -g openclaw as a troubleshooting step normalizes rerunning third-party package installation with elevated privileges. This increases the impact of a compromised package or malicious dependency and can lead to full system compromise.
npm install -g openclaw
sudo npm install -g openclaw
**Q2: openclaw 命令找不到?**
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 检查配置文件权限
# macOS/Linux:
chmod 600 ~/.agents/skills/wechat-publisher/config/config.json
# Windows: 以管理员身份运行配置命令
No suspicious patterns detected.