T09 · Insecure Skill Coding Practices
- Location
scripts/capabilities/configure/service.py:35- Finding
Unvalidated Gateway URL Can Expose the 1688 AK and OpenClaw Gateway Token
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This e-commerce skill is mostly purpose-aligned, but it handles a sensitive store access key and can publish products with weak confirmation and credential-protection controls.
Review this skill carefully before installing. It can use your 1688 AK to query shop data and publish products to connected stores, and the current workflow exposes that AK through chat, command arguments, local config, and an unvalidated gateway URL. Use only a scoped or revocable AK, check OPENCLAW_GATEWAY_URL before configuration, protect the OpenClaw config file, and require your own explicit confirmation before any publish action.
scripts/capabilities/configure/service.py:35Unvalidated Gateway URL Can Expose the 1688 AK and OpenClaw Gateway Token
scripts/capabilities/configure/cmd.py:39AK Credential Is Passed Through Process Command-Line Arguments
scripts/capabilities/configure/service.py:74Plaintext AK Configuration Is Written Without Enforcing Owner-Only Permissions
requirements.txt:1Unbounded Dependency Version Range Makes Installations Non-Reproducible
The service reads OPENCLAW_GATEWAY_URL from the environment and sends the supplied API key to that URL without validating the scheme, host, or trust boundary. If an attacker can influence the environment, they can redirect the credential-bearing PATCH request to an attacker-controlled endpoint, causing API key exfiltration and possible bearer-token leakage.
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:
The documented behavior does not align with the detected capabilities: the skill appears to support undeclared product-detail retrieval and local persistence via data_id while not clearly implementing several advertised core features. This mismatch is dangerous because users and reviewing systems may approve the skill based on the description while hidden storage or alternate data flows enable unexpected data retention, replay, or actions outside the declared trust boundary.
The guide explicitly tells users to paste their AK secret directly into chat, which exposes a credential through conversational logs, model context, and any downstream observability or retention systems. Because this AK is then used to configure access for commerce operations, disclosure could enable unauthorized API use, account abuse, or lateral access to connected shop workflows.
The README explicitly instructs users to send their 1688 Access Key directly to the AI ('我的AK是 xxx') without any warning about secure handling, storage, logging, or redaction. In this skill’s context, the AK is a credential that enables account-linked actions such as querying bound shops and publishing products, so exposing it to an agent materially increases the risk of credential leakage, misuse, or unauthorized downstream store operations.
The skill declares executable commands and references capabilities that imply environment access, file reads, possible file writes, and network use, but it does not constrain tool scope via explicit permissions or allowed-tools. In an agent setting, missing scope boundaries can let the skill invoke broader host capabilities than users expect, increasing the blast radius if the skill is misused or compromised.
The trigger phrases include broad, common commerce terms such as '选品', '上架', '趋势', and '热榜', which can cause the skill to activate in conversations where the user did not intend to invoke it. Overbroad activation is risky here because the skill can progress toward external-shop write actions and credential workflows, so accidental invocation may expose data or initiate operations in the wrong context.
The skill instructs the agent to execute a publish operation after dry-run without requiring explicit user confirmation when the target is unique. This is unsafe because publishing to external shops is a state-changing action with business impact, and uniqueness of the target does not guarantee the user's intent to proceed with the write.
The CLI explicitly documents a configure YOUR_AK command, which encourages users to pass an access key as a command-line argument. Command-line arguments are commonly exposed through shell history, process listings, logs, and agent telemetry, so this creates a real risk of credential disclosure even if the code shown does not itself print the key. In this skill’s context, the key likely grants access to 1688 and downstream shop operations, making leakage more sensitive than a generic token.
The document is entirely written as mandatory Chinese interaction guidance, including exact user phrasing and agent responses, with no indication that other languages are supported or that Chinese is required for a region-specific reason. This can violate language/locale policy when users are not given an opt-in or alternative.
The instructions not only request the AK in chat but also direct the agent to extract it from the user's message and pass it as a CLI argument. This compounds exposure: the secret may appear in chat history, agent traces, command logs, shell history, process listings, or telemetry, making credential leakage more likely in a skill that controls shop configuration and downstream platform operations.
This file presents all user-facing guidance, triggers, and output instructions exclusively in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.
The file title and all operational instructions are written in Chinese, with no indication that the user can choose another language or locale. Under the policy rule, a skill that effectively mandates a specific language without opt-in is a natural-language policy concern.
The entire skill specification is written as mandatory Chinese-language guidance for the agent, including required reply structure and fixed Chinese phrases, but it does not provide any opt-in or alternative language behavior. This can violate a language/locale policy when users or deployments expect the agent to respect user language preference.
The skill explicitly instructs the agent to conceal that the primary workflow failed and that the output is being generated from fallback data. This undermines transparency and can mislead users into treating inferred or substitute analysis as authoritative primary-source reporting, which is especially risky for business decision support.
The file is entirely written in Chinese and does not indicate that language selection is optional or that the locale restriction is required for a region-specific purpose. Per the policy, forcing a specific language without user opt-in can be a natural-language policy violation.
This markdown file instructs the agent to tell the user a fixed Chinese message: "网络异常,请检查网络连接后重试". Because the file contains only Chinese-language prescribed responses and does not offer any language choice or explain a justified region-specific constraint, it appears to enforce a locale/language policy without user opt-in.
The FAQ explicitly instructs users to send abusive and threatening language to customer support in order to force escalation to a human agent. This is unsafe because it encourages harassment, complaint manipulation, and potentially policy-violating behavior, while also hard-coding a specific Chinese phrase without user opt-in. In the context of an e-commerce operations skill, this guidance is especially problematic because it operationalizes adversarial conduct as a support tactic rather than offering legitimate escalation paths.
The entire skill content is presented only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or China-region audience. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.
This markdown file contains user-facing natural-language instructions exclusively in Chinese, and there is no indication that the user can opt into another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy violation.
This Python file contains natural-language docstrings and CLI output entirely in Chinese, including the module description and all test-mode user prompts. Under the policy rule, forcing a specific language without user opt-in or a documented region-specific justification is a locale-policy violation.
This Python file contains natural-language documentation and user-facing exception messages exclusively in Chinese, and it describes a unified output format without indicating any language choice or opt-in. Under the policy rule for language/locale, this can constitute a forced locale behavior because users are not offered an alternative language or a documented regional constraint.
The exception classes return default messages such as "AK 无效或已过期" and "服务异常,请稍后重试" only in Chinese. Because these are user-facing strings and there is no mechanism for language selection or documented region-specific scope, the file appears to force a specific language contrary to the locale policy.
The function sends the API key in a PATCH request payload to the configured gateway URL, which is a network transmission of sensitive data. This file does not provide any user-facing warning, confirmation, or logging that the credential will be sent to a local or remote service, and the default URL uses plain HTTP.
This code creates the config directory and writes the provided API key into a local JSON config file, which is a safety-relevant file write involving credentials. Although the function has an internal docstring, there is no visible user-facing confirmation, warning, or logging in this file to disclose that credential material will be persisted to disk.
This code hard-codes user-facing descriptions and error messages in Chinese, including the module docstring, command description, and runtime output. Because the skill does not provide any user opt-in or locale selection, it may violate language/locale policy requirements for offering a choice.
No suspicious patterns detected.