Back to skill

Security audit

Acpx Bridge Troubleshooting Guide

Security checks for vulnerabilities and agentic risk

Overview

This troubleshooting skill is mostly about the stated OpenClaw/acpx setup, but it exposes and mishandles credentials and makes broad local configuration changes without enough safeguards.

Review before installing or running. Treat the shown gateway token as compromised and do not use it. Avoid passing real Feishu app secrets as command-line arguments, secure any token files with owner-only permissions, do not share diagnostic output without redaction, and avoid the global acpx@latest upgrade unless you intentionally accept that supply-chain and tooling change.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:109
Finding

Hard-Coded Gateway Authentication Token in Documentation

Content
View full analysis
~/.openclaw/gateway.token ``` ``` ### Technical Analysis The documentation embeds a concrete, high-entropy value and identifies it as a Gateway token. Unlike other examples that use redacted values or obvious placeholders, this command instructs users to install the exposed value as an authentication credential. If the token is valid, was previously valid, or is reused by any deployment, possession of the project is sufficient to recover it. Secrets committed to documentation should be treated as compromised because they may remain available through repository history, package mirrors, logs, and cached copies even after removal. ### Attack Path 1. An attacker obtains the publicly distributed Skill or its repository history. 2. The attacker extracts the hard-coded Gateway token from `SKILL.md`. 3. The attacker identifies a reachable OpenClaw Gateway using the same token. 4. The attacker presents the exposed token to the Gateway. 5. If the token remains valid and no additional control blocks access, the attacker obtains the access granted to that Gateway credential. ### Impact Assessment Successful exploitation could grant unauthorized access to an affected OpenClaw Gateway at the privilege level assigned to the token. The exact scope depends on Gateway configuration and network exposure. Deployments that never used this value are not directly affected, but the value must still be considered compromised. ]]>
Remediation
View remediation
`. 3. Search repository history, releases, logs, and distributed packages for the token. 4. Use secret-scanning controls in continuous integration to reject high-entropy credentials. 5. Prefer an interactive prompt or protected secret store rather than embedding credentials in documentation or commands. 6. Document restrictive token-file permissions, such as mode `0600`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/diagnose_acpx.sh:12
Finding

Diagnostic Output Discloses Gateway Token Material and Configuration Data

Content
View full analysis
\" > ~/.openclaw/gateway.token" fi echo "" # 2. 检查 acpx 配置 echo "2️⃣ 检查 acpx 配置:" if [ -f ~/.acpx/config.json ]; then echo " ✅ ~/.acpx/config.json 存在" echo " 配置内容:" cat ~/.acpx/config.json | sed 's/^/ /' else echo " ❌ ~/.acpx/config.json 缺失" fi ``` ### Technical Analysis The diagnostic script prints the first ten characters of the Gateway token and then emits the entire acpx configuration without redaction. Partial token disclosure reduces token entropy and may be useful when combined with another leak or a weak token-generation scheme. The configuration output may also expose credentials, private endpoints, agent commands, or other sensitive operational settings if users have extended the file beyond the default configuration. Diagnostic output is particularly sensitive because users routinely paste it into issue trackers, support chats, build logs, or other locations with broader access than the underlying files. ### Attack Path 1. A user executes `scripts/diagnose_acpx.sh` while troubleshooting. 2. The script reads the Gateway token and acpx configuration from the user's home directory. 3. Token characters and unredacted configuration are written to standard output. 4. The output is captured in a terminal log, automation log, support ticket, or chat. 5. An unauthorized reader obtains the disclosed data and uses any recovered credential or sensitive endpoint information against the affected environment. ### Impact Assessment The direct impact includes disclosure of ten token ch ...[truncated 309 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/add_feishu_account.sh:12
Finding

Feishu Application Secret Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/fix_acpx_bridge.sh:41
Finding

Unpinned Global Installation of a Mutable Third-Party Package

Content
View full analysis
/dev/null || echo "⚠️ npm 更新失败,请手动执行:npm install -g acpx@latest" ``` ### Technical Analysis The repair script installs the mutable `latest` release of `acpx` globally. The package version reviewed when the Skill was authored is therefore not necessarily the version users receive. If the npm package, publisher account, release process, or transitive dependency is compromised, installation can introduce malicious code after this Skill has already passed review. npm packages can execute lifecycle scripts during installation. A global installation also changes shared user-level or system-level tooling rather than containing the dependency within this project. The resulting privilege level depends on the account running the repair script; running it under an elevated npm setup would increase impact. The same unsafe command is recommended in `SKILL.md:55` and `references/acpx-配置参考.md:56`. ### Attack Path 1. An attacker compromises the `acpx` package publication process, its publisher account, or a dependency included in a new release. 2. The malicious release becomes the package tagged as `latest`. 3. A user runs `scripts/fix_acpx_bridge.sh`. 4. npm retrieves the mutable release and runs applicable installation lifecycle behavior. 5. Malicious code executes with the privileges of the user running npm and the global `acpx` command is replaced with the compromised version. 6. Subsequent invocations can access files, credentials, and network resources available to that user. ### Impact Assessment A compromised package can execute arbitrary code with the invoking user's privileges and can affect subsequent uses of the globally installed command. The impact may include crede ...[truncated 202 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fix_acpx_bridge.sh:8
Finding

Gateway Token File Created Without Enforcing Restrictive Permissions

Content
View full analysis
~/.openclaw/gateway.token echo "✅ gateway.token 已创建" ``` ### Technical Analysis The script writes an authentication token to `~/.openclaw/gateway.token` without setting a restrictive umask or explicitly applying mode `0600`. The resulting mode depends on the user's current umask. Under a permissive umask, the token may be readable by other local accounts. The extraction logic also searches for the first generic JSON property named `token` using regular expressions. It does not parse the intended structured field. If `openclaw.json` contains multiple token properties, the script may copy an unrelated credential into `gateway.token`. It also overwrites an existing token file without confirmation or an atomic replacement procedure. Similar permission-unsafe creation commands appear in `SKILL.md:28`, `SKILL.md:111`, and `references/openclaw-飞书多账户配置.md:95`. ### Attack Path 1. A user runs the repair script with a permissive umask. 2. The script extracts the first matching `token` property and writes it to `~/.openclaw/gateway.token`. 3. The new file receives permissions that permit another local account to read it. 4. A local attacker reads the file and obtains the Gateway credential. 5. The attacker presents the token to an accessible Gateway and receives the permissions associated with that credential. Alternatively, a crafted or unexpectedly structured `openclaw.json` can place another token field befor ...[truncated 480 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose emphasizes remediation and configuration steps for multiple specific issues, especially fixing acpx/OpenClaw problems and setting up Feishu multi-account support. The actual code is limited to diagnostics: it inspects local files, prints portions of sensitive config/token data, and invokes status/validation commands. While these checks are related to the same general domain (acpx/OpenClaw troubleshooting), the script does not implement the key promised behaviors such as creating token files, modifying configs, updating software, or configuring Feishu accounts. Therefore the description materially overstates what the code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description is substantially broader than the code’s actual behavior. The script does perform some of the claimed bridge-repair steps: creating gateway.token, rewriting ACPX config, and updating ACPX. However, it does not implement the major additional claimed areas, especially Feishu multi-account configuration, bindings routing repair, or any use of openclaw config set. Its primary behavior is a narrow local repair script for ACPX/OpenClaw bridge setup, not the full troubleshooting and configuration scope stated in the description. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The guide includes commands that write sensitive token material and modify local configuration files without warning about overwrites, permissions, backups, or command-history exposure. In practice, this can lead to credential leakage, accidental configuration corruption, or insecure file creation on shared systems.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

操作:

bash
# 检查文件是否存在
ls -la ~/.openclaw/gateway.token

# 如果不存在,从 openclaw.json 找到 token 并创建
echo "你的_gateway_token" > ~/.openclaw/gateway.token

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide presents multi-account Feishu setup as the correct path, but later admits the routing feature is not actually supported. This contradiction can cause operators to apply secrets and configuration changes under a false assumption of support, leading to misrouting, service disruption, or accidental exposure of credentials during troubleshooting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill shows credential-bearing commands containing app secrets without privacy and secret-handling warnings. Secrets embedded in shell commands may be exposed via shell history, logs, screenshots, or terminal sharing, which is especially risky in operational documentation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document instructs users to route bindings using accountId, but later states bindings cannot distinguish accountId in practice. This can directly produce insecure or incorrect message routing, where users believe traffic is isolated between bots when it is not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JSON file encodes all example user prompts and expected responses in Chinese, effectively constraining the skill's interaction language. Under the policy, forcing a specific language without offering user choice or documenting a justified regional scope is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The guide instructs users to write a gateway token directly into a file but does not warn that the token is a sensitive credential or recommend securing file permissions and avoiding shell history leakage. In an operational troubleshooting context, this can lead to accidental credential exposure through shared terminals, logs, screenshots, backups, or permissive filesystem settings, enabling unauthorized access to the gateway.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script accepts app_secret as a positional command-line argument, which can expose the credential through shell history, process listings, audit logs, and CI job output. In this troubleshooting/admin context, the risk is more significant because operators are likely to run the script on shared servers or developer workstations where such exposure is realistic.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script reads a credential from ~/.openclaw/gateway.token and prints part of it to stdout. Even partial secrets can leak into terminal scrollback, logs, screen recordings, support transcripts, or CI/job output, unnecessarily exposing sensitive authentication material during troubleshooting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script outputs the full ~/.acpx/config.json contents, which may contain tokens, endpoint details, account identifiers, or other sensitive configuration data. In a troubleshooting context, users are likely to copy and share this output, making accidental credential and environment disclosure more likely.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · scripts/fix_acpx_bridge.sh (reported line 10)May include surrounding context.

sh
echo "🦞 开始修复 acpx 桥接问题..."

# 1. 创建 ~/.openclaw 目录(如果不存在)
mkdir -p ~/.openclaw

# 2. 从 openclaw.json 提取 token 并创建 gateway.token 文件
if [ -f ~/.openclaw/openclaw.json ]; then

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically extracts a token from ~/.openclaw/openclaw.json and writes it to ~/.openclaw/gateway.token without prompting the user, warning about sensitivity, or setting restrictive file permissions. This increases the risk of credential exposure through overly permissive default umask settings, accidental backup/sync, or local disclosure on multi-user systems.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · scripts/fix_acpx_bridge.sh (reported line 26)May include surrounding context.

sh
fi

# 3. 修复 acpx 配置文件
mkdir -p ~/.acpx
cat > ~/.acpx/config.json << 'EOF'
{
  "defaultAgent": "openclaw",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description, headings, instructions, and examples are presented entirely in Chinese, and the file does not indicate that the language is optional or region-specific. Under the policy, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

All comments and user-facing messages are in Chinese, including usage and status output, with no indication that the skill is intended only for a Chinese-speaking or region-specific audience. This can violate language/locale policy when users are not given a choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All human-readable comments and terminal output in the script are in Chinese, with no indication that the skill is region-specific or that another language is available. This can violate language/locale policy when a specific language is imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Multiple comments and all user-facing status messages are written in Chinese, which imposes a specific language choice on users without offering an alternative. This is a natural-language locale policy issue because the script does not provide language selection or explain a region-specific requirement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.