Back to skill

Security audit

1688 Shop Zkt Buyer Manage

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a customer-intelligence tool, but its credential setup and agent-instruction rules create risks that should be reviewed before installation.

Review before installing. Use a dedicated, least-privilege 1688 AK; avoid pasting the AK into shell commands; verify OPENCLAW_GATEWAY_URL points only to the trusted local OpenClaw gateway; protect or rotate any AK already written to openclaw.json; and install only if you accept automatic usage reporting and access to sensitive customer intelligence data.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:23
Finding

Agent Instruction Hijacking Through Mandatory Priority and Verbatim Output Rules

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

API Key and Gateway Bearer Token Can Be Sent to an Arbitrary Environment-Controlled URL

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 The destination of the configuration request is taken directly from `OPENCLAW_GATEWAY_URL`. The code does not validate the URL scheme, hostname, resolved address, port, or origin before sending the request. The request body contains the 1688 API key, while the `Authorization` header may contain the OpenClaw gateway bearer token. Therefore, a single environment-variable override can redirect both credentials to an attacker-controlled endpoint. The default endpoint uses plaintext HTTP on loopback, which can be acceptable for a strictly local service. However, the implementation does not enforce loopback. A value such as `http://attacker.example` or an attacker-controlled internal address is accepted without warning. No HTTPS requirement is imposed for non-loopback destinations. This behavior exceeds least privilege because credential configuration only ...[truncated 1453 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

API Key Is Persisted in Plaintext 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 configured path is defined as follows in `scripts/_const.py:13-16`: ```python OPENCLAW_CONFIG_PATH: Path = Path( os.environ.get("OPENCLAW_CONFIG_DIR", Path.home() / ".openclaw") ) / "openclaw.json" ``` ### Technical Analysis When gateway-based configuration is unavailable, the fallback places the complete API key directly into `openclaw.json`. The implementation creates the directory and opens the file using the process’s default umask, but it does not explicitly require owner-only permissions. For a newly created file, the resulting mode depends on the process environment. For a ...[truncated 1787 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_auth.py:200
Finding

Credential Setup Exposes Secrets Through Command-Line Arguments and Authentication Diagnostics

Content
View full analysis
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 (59)

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

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The gateway URL is taken directly from an environment variable and used as the destination for a PATCH request carrying the API key and optional bearer token. If that environment variable is altered, the skill can exfiltrate credentials to an attacker-controlled service; the customer-management context does not justify broad credential forwarding, which makes this especially risky.

Content

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

The Chinese description similarly omits that the skill can manage configuration and process credentials, creating the same transparency and review gap across locales. Security-relevant behavior hidden behind a business-focused description can mislead operators into granting trust or permissions they would otherwise restrict.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The Chinese description similarly omits that the skill can manage configuration and process credentials, creating the same transparency and review gap across locales. Security-relevant behavior hidden behind a business-focused description can mislead operators into granting trust or permissions they would otherwise restrict.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The Chinese description similarly omits that the skill can manage configuration and process credentials, creating the same transparency and review gap across locales. Security-relevant behavior hidden behind a business-focused description can mislead operators into granting trust or permissions they would otherwise restrict.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The Chinese description similarly omits that the skill can manage configuration and process credentials, creating the same transparency and review gap across locales. Security-relevant behavior hidden behind a business-focused description can mislead operators into granting trust or permissions they would otherwise restrict.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The Chinese description similarly omits that the skill can manage configuration and process credentials, creating the same transparency and review gap across locales. Security-relevant behavior hidden behind a business-focused description can mislead operators into granting trust or permissions they would otherwise restrict.

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 31)May include surrounding context.

md
- `{baseDir}` = skill 根目录(含 `SKILL.md` 和 `cli.py` 的目录)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `{baseDir}` = skill 根目录(含 `SKILL.md` 和 `cli.py` 的目录)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `{baseDir}` = skill 根目录(含 `SKILL.md` 和 `cli.py` 的目录)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that call records are automatically reported, but users are not informed about the transmission or given any privacy notice. This is particularly risky here because the skill processes customer intelligence and may involve commercially sensitive or personal data context.

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 materially unrelated to the declared customer intelligence skill and instead instructs the agent to solicit a DingTalk Access Key and configure message-sending credentials. This kind of capability mismatch is a strong indicator of hidden functionality or prompt-scope smuggling, creating a path to collect secrets unrelated to the user’s expected task.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document explicitly introduces credential collection and a message-sending setup that has no clear relationship to customer inquiry analysis, follow-up suggestions, or buyer profiling. In context, this is more dangerous because users would reasonably trust the skill with CRM-like analysis, not expect it to request reusable messaging credentials that could enable unauthorized outbound 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-shop-zkt-buyer-manage
    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-shop-zkt-buyer-manage
    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-shop-zkt-buyer-manage
    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

The file implements AK credential status checking and persistence, which is unrelated to the advertised customer intelligence functionality. A skill that collects and writes access credentials under misleading business-facing branding creates a strong risk of credential harvesting or unauthorized secret manipulation, especially because users may provide sensitive AK values expecting normal CRM features.

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 or permission boundary, yet the documented implementation uses environment variables, filesystem access, network access, and configuration writes. Without a least-privilege declaration, a host agent may grant broader capabilities than necessary, increasing blast radius if the skill is modified or abused.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill is designed to expose detailed customer profiles, purchasing habits, decision factors, and inquiry activity at other shops. Even if intended for business use, this is sensitive commercial and potentially personal data, and inadequate access control, minimization, or masking could lead to privacy violations or competitive misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

文档明确规定“Agent 所有面向用户的输出必须 100% 用中文”,并禁止任何英文或中英混排。这构成了语言/locale 强制策略,但未向用户提供语言选择,也未在文档中明确说明该限制是出于区域合规或产品范围限定。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Overly broad trigger phrases for follow-up messaging can cause the skill to activate in unintended contexts and produce sensitive customer-analysis outputs or business guidance when the user did not clearly request it. In an agent environment, ambiguous invocation increases the chance of accidental data access and surprise actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Generic detail-query triggers blur the boundary for when customer profile retrieval should occur. Because this skill can surface detailed buyer information and cross-shop inquiry data, accidental triggering is more dangerous than in a low-sensitivity skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The CLI unconditionally attempts to report skill usage after every command via _tracker.report_skill_usage() and does so without any notice, consent flow, or visible configuration in this file. In a customer-management skill, telemetry may reveal sensitive business activity patterns, command usage, or identifiers if the tracker includes arguments or context, creating a privacy and data-governance risk even though the exact transmitted fields are not shown here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown mandates Chinese presentation conventions, including a fixed Chinese opening narrative and Chinese field headers, without any indication that users may choose another language. This is a natural-language locale policy concern because the skill appears to require a specific language by default rather than documenting a justified region-specific constraint or offering opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide tells the agent to ask for an Access Key and pass it on the command line, but provides no warning about sensitive credential handling or the risks of disclosure through logs, shell history, process listings, or transcript retention. Even if not intentionally malicious, this creates an unsafe secret-handling pattern that can expose reusable credentials.

Content

No source excerpt is available for this finding.