Back to skill

Security audit

1688 Item One Click

Security checks for vulnerabilities and agentic risk

Overview

This skill can perform legitimate 1688 product edits, but its write scope and credential handling are loose enough that it should be reviewed before use.

Install only if you are comfortable granting this skill authority to change 1688 merchant listings and promotions with the configured AK. Before using it, verify the gateway destination, avoid passing secrets through shared shells or logs, restrict permissions on OpenClaw config files, and require explicit user confirmation before every execute call, especially for discount or promotion changes.

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

Error
Location
scripts/capabilities/execute/service.py:8
Finding

Product Mutations Can Bypass the Required Pre-Check and User Confirmation Workflow

Content
View full analysis
dict: """ Execute the actual modification. Must only be called after before_check succeeds and the user confirms. """ if not item_id: raise ParamError("Product ID (item_id) cannot be empty") if not spi_code: raise ParamError("Operation code (spi_code) cannot be empty") if not spi_params: raise ParamError("Operation parameters (spi_params) cannot be empty") data = api_post( f"/api/{TOOL_CODE_EXECUTE}/1.0.0", { "item_id": item_id, "spi_code": spi_code, "spi_params": spi_params, }, timeout=30, ) if not isinstance(data, dict): raise ServiceError("Invalid response format; try again later") return data ``` The command entry point invokes this function directly: ```python parser.add_argument('--item_id', type=str, required=True, help='Product ID') parser.add_argument('--spi_code', type=str, required=True, help='Operation code') parser.add_argument('--spi_params', type=str, required=True, help='Operation parameters as JSON') args = parser.parse_args() try: spi_params = json.loads(args.spi_params) except json.JSONDecodeError as e: print_error(ValueError(f"spi_params is not valid JSON: {e}")) return try: result = execute_action(args.item_id, args.spi_code, spi_params) ``` ### Technical Analysis The Skill documentation requires every write operation to follow this sequence: 1. Call `before_check`. 2. Verify that the proposed operation is permitted. 3. Display the proposed mutation or agreement to the user. 4. Obtain explicit user confirmation. 5. ...[truncated 2167 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Environment-Controlled Gateway URL Can Receive the AK and Gateway Bearer Token

Content
View full analysis
bool: """Write configuration through the OpenClaw Gateway REST API.""" 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 accepted without validating its scheme, hostname, port, or trust boundary. The resulting endpoint receives: - The full 1688 AK in the JSON request body. - The OpenClaw Gateway bearer token in the `Authorization` header, when configured. If an attacker can influence the process environment, the URL can be changed from the expected loopback Gateway to an attacker-controlled HTTP or HTTPS server. The code will then transmit both credentials to that destination. The default loopback URL is consistent with the declared configuration function, but unrestricted support for arbitrary origins exceeds the minimum privilege necessary for communicating with a local OpenClaw Gateway. An external `http://` URL would additionally transmit credentials without transport encryption. ### Attack Path 1. An attacker or compromised launcher influences the environment used to run the Skill: ```bash ...[truncated 1265 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Fallback Configuration Stores the Complete AK Without Enforcing Restrictive File Permissions

Content
View full analysis
bool: """Write directly to 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 fallback is automatically selected when Gateway configuration fails: ```python write_ok = configure_via_gateway(ak) or configure_via_file(ak) ``` ### Technical Analysis The fallback writes the complete AK into `openclaw.json` as plaintext. The implementation does not explicitly enforce owner-only permissions on either the configuration directory or file. For a newly created file, effective permissions depend on the process umask. For an existing file, opening it with mode `"w"` truncates and rewrites it while retaining the existing file's permissions. Consequently, a pre-existing ...[truncated 1811 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (44)

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

Critical
Category
Data Flow
Confidence
91% confidence
Finding

The service takes OPENCLAW_GATEWAY_URL directly from the environment and sends the supplied API key to that endpoint, optionally with a bearer token. If an attacker can influence environment variables or deployment configuration, they can redirect credential writes to an attacker-controlled server, causing secret exfiltration; the default use of plain HTTP also increases exposure.

Content

Scanner excerpt · scripts/capabilities/configure/service.py (reported line 50)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
98% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a product-editing tool but also includes API key configuration, secret handling, and network gateway updates. Mixing credential-management behavior into a business-operation skill without prominent disclosure increases the risk of credential misuse, accidental secret exposure, and over-privileged execution.

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-item-one-click
    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 25)May include surrounding context.

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

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-item-one-click
    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 40)May include surrounding context.

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

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-item-one-click
    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
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:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements access-key configuration and secret-handling behavior that is unrelated to the declared purpose of the skill, which is one-click 1688 item editing. A skill that silently introduces credential configuration expands privilege and trust boundaries, and can be used to capture, persist, or manipulate sensitive credentials under the guise of an unrelated business function.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The executable logic performs AK validation, checking, and persistence rather than product title/image/member-post modification as advertised. This mismatch is dangerous because users or platforms may grant execution based on the manifest's benign item-editing description, while the actual code handles secrets and configuration state, enabling covert collection or misuse of credentials.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares no explicit tool scope even though it documents capabilities that involve environment access, local file reads/writes, and network calls. Without a least-privilege declaration, an agent may grant broader access than users expect, increasing the blast radius if the skill is misused or compromised.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Broad trigger phrases such as generic 'one-click modify' or 'product modify' can cause the skill to activate on ordinary conversational requests. Because this skill supports write operations, accidental invocation raises the risk of unintended modification attempts and user confusion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation expands the skill to include discount-setting, which is outside the declared manifest scope. Scope expansion matters because agents or users may invoke a write-capability that was not clearly authorized or reviewed, leading to unintended business-impacting changes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Presenting discount-setting as a valid operation while other sections define a narrower scope creates contradictory operator guidance. In an agent setting, contradictory documentation can cause unauthorized or unintended write actions against product listings and promotions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents automatic usage reporting to an external endpoint but does not prominently disclose this behavior in the main description or consent flow. Underspecified telemetry is dangerous because it can leak operational metadata and surprise users who believed they were only modifying product data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented before_check capability includes spi_hsf_offer_promotion_dszk for setting limited-time discounts, but the skill metadata only advertises title changes, main image changes, and member-post publishing. This creates a scope-expansion/integrity risk: an agent or user relying on the manifest may unknowingly invoke a price-affecting operation, leading to unauthorized commercial changes and financial impact.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill exposes an AccessKey configuration capability that is outside the manifest’s stated end-user purpose of one-click product editing and posting updates. Hidden or undocumented credential-handling functionality expands the trust boundary, can surprise users or orchestrators, and may enable unauthorized access setup if invoked inappropriately.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to pass an AccessKey directly via CLI without an explicit warning that the value is sensitive. This can lead to credential exposure through shell history, process listings, logs, screenshots, or copied command transcripts, making compromise of downstream authenticated operations more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The execute capability documents and enables a write operation for setting limited-time discounts, but the skill metadata only declares title changes, main image changes, and posting member updates. This scope mismatch is dangerous because an agent or user may invoke an undeclared pricing/promotion action that directly alters commercial terms, bypassing user expectations, approval boundaries, or policy review tied to the manifest.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The operation table exposes a promotion/pricing action (spi_hsf_offer_promotion_dszk) beyond the stated skill capabilities, effectively expanding the reachable write surface without transparent disclosure. In this skill context, changing discounts is more sensitive than cosmetic edits like title or image updates because it can immediately affect revenue, compliance, and customer-facing pricing behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI unconditionally reports usage telemetry after every command via _tracker.report_skill_usage() and this file provides no user-facing disclosure, consent flow, or opt-out. In a skill that performs potentially sensitive merchant operations, silent telemetry can expose operational metadata such as command usage patterns, identifiers, or execution context, creating privacy and compliance risk even if the main command succeeds.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The module-level docstring is written entirely in Chinese and describes the standardized output shape, while all exception messages are also hard-coded in Chinese elsewhere in the file. This indicates a fixed language choice without any visible user opt-in or language-selection mechanism, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.