Back to skill

Security audit

1688 Customer Opportunity

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a 1688 customer-operations tool, but its Access Key setup can expose credentials through unsafe command-line, file, and gateway handling.

Review this skill before installing. It can read customer and buyer-operation data and can activate a Wangwang marketing plan after confirmation. Do not paste production Access Keys into chat or command lines unless you accept that exposure risk; prefer a platform-managed secret flow. Only use the gateway configuration path when OPENCLAW_GATEWAY_URL is trusted and local or otherwise explicitly approved, and check permissions on any openclaw.json file that stores credentials.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/configure/cmd.py:39
Finding

Access Key Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/capabilities/configure/service.py:28
Finding

Unrestricted Gateway URL Can Receive the Access Key and Gateway Bearer Token

Content
View full analysis
bool: """Through OpenClaw Gateway REST API write configuration""" try: import requests except ImportError: return False gateway_url = os.environ.get("OPENCLAW_GATEWAY_URL", "http://localhost:18789") token = os.environ.get("OPENCLAW_GATEWAY_TOKEN", "") payload = { "skills": { "entries": { SKILL_NAME: { "apiKey": api_key } } } } try: headers = {} if token: headers["Authorization"] = f"Bearer {token}" resp = requests.patch(f"{gateway_url}/api/config", headers=headers, json=payload, timeout=5) return resp.ok except Exception: return False ``` ### Technical Analysis `OPENCLAW_GATEWAY_URL` is consumed without validating its scheme, hostname, port, path, or locality. The resulting request contains: - The merchant Access Key in the JSON body. - The OpenClaw Gateway bearer token in the `Authorization` header, when configured. Although the default destination is a local Gateway, the code accepts any environment-provided URL. A poisoned or incorrectly configured environment can redirect the request to an attacker-controlled server. The implementation also accepts cleartext HTTP for non-loopback destinations, allowing interception of both credentials in transit. This behavior exceeds the minimum privilege needed for local configuration because a local configuration function should not forward authentication material to arbitrary remote hosts. ### Attack Path 1. An attacker-controlled launcher, wrapper, configuration, or compromised runtime sets: ```bash OPENCLAW_G ...[truncated 1332 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/configure/service.py:59
Finding

Plaintext Access Key Stored Without Explicit Permission Hardening

Content
View full analysis
bool: """Directly write openclaw.json as a fallback""" try: config: dict = {} if CONFIG_PATH.exists(): try: with open(CONFIG_PATH, "r", encoding="utf-8") as f: content = f.read().strip() if content: config = json.loads(content) except json.JSONDecodeError: return False config.setdefault("skills", {}) config["skills"].setdefault("entries", {}) config["skills"]["entries"].setdefault(SKILL_NAME, {}) skill_entry = config["skills"]["entries"][SKILL_NAME] skill_entry["apiKey"] = api_key if "env" in skill_entry and isinstance(skill_entry["env"], dict): skill_entry["env"].pop("ALI_1688_AK", None) if not skill_entry["env"]: del skill_entry["env"] CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True) with open(CONFIG_PATH, "w", encoding="utf-8") as f: json.dump(config, f, ensure_ascii=False, indent=2) return True except Exception: return False ``` The destination is constructed as follows: ```python OPENCLAW_CONFIG_PATH: Path = Path( os.environ.get("OPENCLAW_CONFIG_DIR", Path.home() / ".openclaw") ) / "openclaw.json" ``` ### Technical Analysis When Gateway-based configuration fails, the fallback writes the complete Access Key in plaintext to `openclaw.json`. The implementation does not: - Create the configuration directory with an explicit `0700` mode. - Create the credential-bearing file with an explicit `0600` mode. - Check or repair permissions on an existing file. - Use a pro ...[truncated 1638 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (66)

Tainted flow: 'gateway_url' from os.environ.get (line 35, credential/environment) → requests.patch (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The code takes OPENCLAW_GATEWAY_URL directly from the environment and sends the supplied API key to that URL with no allowlist, scheme validation, or host verification. If an attacker can influence the environment, they can redirect credential-bearing requests to an attacker-controlled endpoint and exfiltrate the API key and optional bearer token.

Content

Scanner excerpt · scripts/capabilities/configure/service.py (reported line 52)May include surrounding context.

python
headers = {}
        if token:
            headers["Authorization"] = f"Bearer {token}"
        resp = requests.patch(f"{gateway_url}/api/config",
                              headers=headers, json=payload, timeout=5)
        return resp.ok
    except Exception:

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

AK validation and writing configuration locally or via REST gateway materially expand the trust model of the skill beyond passive customer analysis. In a business environment, hidden secret handling plus network communication can enable account misuse or lateral data exposure if the skill is misconfigured or compromised.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
CLI 入口文件:`{baseDir}/cli.py`(`{baseDir}` = skill 根目录,含 `SKILL.md` 和 `cli.py`)。**禁止** `{baseDir}/scripts/cli.py`——`cli.py` 不在 `scripts/` 子目录。

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

该处明确要求所有用户可见输出必须100%使用中文,并禁止任何英文表述,这是明显的语言/locale 强制策略。文档中未说明这是仅适用于特定地区合规场景,也未向用户提供语言选择或显式同意机制,因此构成自然语言政策违规。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The configuration guide is for DingTalk message-sending AK setup, which is unrelated to the declared 1688 customer-operation skill. This capability mismatch is dangerous because it can mislead users into granting credentials for an unstated channel, expanding the skill’s effective privileges and creating a path for unauthorized messaging or data exfiltration under a misleading cover story.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guide tells users to paste an Access Key into chat and then pass it as a command-line argument, exposing the secret in conversation history, logs, shell history, and process listings. This creates a direct credential leakage risk that could allow anyone with access to transcripts or host telemetry to reuse the key for unauthorized API actions.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_tracker.py (reported line 8)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-open-skill-template
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_tracker.py (reported line 26)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-open-skill-template
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_tracker.py (reported line 43)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-open-skill-template
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhub

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_tracker.py (reported line 27)May include surrounding context.

python
def _load_env_file() -> None:
    """解析项目根目录的 .env 文件,将变量注入 os.environ(已有环境变量不覆盖)。"""
    env_path = _ROOT_DIR / ".env"
    if not env_path.exists():
        return
    with open(env_path, encoding="utf-8") as f:

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This skill is described as a customer follow-up and operations tool, but the file implements credential discovery and storage, including reading existing secrets from environment/config and writing API keys to persistent config. That mismatch is dangerous because users or calling systems may grant or execute the skill under assumptions unrelated to secret handling, enabling unnecessary access to credentials and increasing the blast radius if the skill is abused or compromised.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares broad operational behavior and references capabilities that imply file, environment, and network access, but it does not define an explicit tool/permission scope. Without least-privilege restrictions, a host agent may grant more access than is necessary, increasing the blast radius if the skill logic is abused or compromised.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Overly broad trigger phrases can cause the skill to activate in conversations that were not intended to invoke customer-data operations. In this skill context, accidental triggering is more dangerous because the documented flows can query buyer details, profiles, and recommendations, increasing the risk of unnecessary data access or unintended outbound actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The 'key customer direct query' trigger set contains broad business phrases that may match ordinary discussion rather than an explicit request to run the skill. Because this skill can pivot into customer segmentation and follow-up analysis, accidental activation can expose sensitive buyer insights without clear user intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow instructs the agent to use list_customer_details and customer_crowd_analysis even though those capabilities are not consistently declared in the skill's stated scope. This kind of scope drift can bypass reviewer expectations and cause the agent to invoke extra data-access paths that were not approved as part of the advertised functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Usage tracking is triggered after every command with no visible notice, consent flow, or configuration gate in this file. In a customer-operations skill that may process buyer identities and business activity, hidden telemetry increases privacy risk and could leak commercially sensitive usage context if the tracker captures command names, timing, or arguments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file is entirely written as an operational instruction in Chinese, beginning with the core activation description, and it does not offer any language choice or note that the skill is region/language-specific. Under the policy criteria, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.