Back to skill

Security audit

1688 Distribution

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for 1688 distribution, but its credential handling and automatic account actions need review before installation.

Install only if you trust the publisher and are comfortable with a skill that can store and use a 1688 Access Key, query account/shop/order data, perform distribution actions, and send seller messages. Review or fix the AK storage/status leakage and callback server binding/authentication before use, and require explicit confirmation before browser authorization, credential reset/clear, product distribution, or outbound seller messaging.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/_sys/_callback_server.py:288
Finding

Unauthenticated network-reachable endpoint can overwrite the stored Access Key

Content
View full analysis
None: """Linux/macOS: one AF_INET6 dual-stack socket accepts IPv4 and IPv6.""" self._server.server_close() self._server = _ThreadingHTTPServerIPv6(("::", port), handler, bind_and_activate=False) self._server.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0) self._server.server_bind() self._server.server_activate() self._thread = threading.Thread( target=self._server.serve_forever, daemon=False, name="ak-callback-server", ) self._thread.start() ``` ```python # scripts/_sys/_callback_server.py:288-313 def _handle_save_ak(self): origin = self.headers.get("Origin", "") allowed = f"http://localhost:{server_ref._port}" allowed2 = f"http://127.0.0.1:{server_ref._port}" if origin and origin not in (allowed, allowed2): self._send_json(403, {"success": False, "error": "CORS_DENIED"}) return content_length = int(self.headers.get("Content-Length", 0)) body = json.loads(self.rfile.read(content_length)) if content_length > 0 else {} ak = body.get("ak", "") if not ak: self._send_json(400, {"success": False, "error": "MISSING_AK", "error_description": "AK cannot be empty"}) return result = server_ref._save_ak(ak) server_ref._result = result if resu ...[truncated 3104 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/capabilities/configure/cmd.py:47
Finding

Credential status output discloses the complete Access Key in structured data

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Access Key is stored in plaintext without explicit restrictive file permissions

Content
View full analysis
bool: """Store the AK in the ak_store file.""" try: AK_STORE_FILE.parent.mkdir(parents=True, exist_ok=True) with open(AK_STORE_FILE, "w", encoding="utf-8") as f: json.dump({"ak": ak}, f, ensure_ascii=False) return True except Exception: return False ``` The configured path is: ```python # scripts/_sys/_const.py:45-47 AK_DATA_DIR = Path( os.environ.get("AGENT_WORK_ROOT", str(WORKSPACE_DIR)), "workspace", ".1688-AK", ) AK_STORE_FILE = AK_DATA_DIR / ".ak_store.json" ``` ### Technical Analysis The credential is written directly to JSON in plaintext. Neither the directory nor the file receives an explicit restrictive mode. Effective permissions therefore depend on the process umask and pre-existing filesystem permissions. On permissively configured systems, shared workspaces, backup systems, or multi-user agent hosts, other local principals or services may be able to read the credential. If the file already exists with broad permissions, opening it with `"w"` truncates and rewrites it but does not correct its mode. The project contains `scripts/_sys/_ak_crypto.py`, which implements local credential encryption, and `_auth.py` supports decrypting values with the `v1:` prefix. However, `configure_via_ak_store()` never calls `encrypt_ak()`, so newly configured credentials remain plaintext. The Base64 use inside `_ak_crypto.py` is not a covert exfiltration mechanism. It serializes locally encrypted bytes. Likewise, Base64 in `_auth.py` is used for AK parsing, content digests, and HMAC signature serialization. No evidence showed those encoding operations secretly outputting or tra ...[truncated 1414 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (75)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Local AK configuration and deletion are sensitive credential-management functions that are not adequately reflected in the user-facing description. Undisclosed secret persistence and mutation increase the risk of credential theft, misuse, or unexpected account changes, especially when automatically triggered during ordinary distribution workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file implements a generic credential-management CLI for acquiring, storing, resetting, and displaying AK status, which is outside the declared 1688 distribution skill scope. Hidden or unjustified credential-handling capabilities expand the trust boundary and can facilitate unauthorized account binding, token capture, or persistence mechanisms that users would not reasonably expect from this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill documentation 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 region-specific audience. This creates a language/locale policy concern because the documentation implicitly enforces a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares no explicit tool scope while its documented workflow requires shell, file access, network access, browser automation, and credential handling. Without least-privilege restrictions, a compromised or misrouted invocation could use broader capabilities than users would reasonably expect from a distribution assistant.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are broad and overlap with common commerce and help requests, so the skill may activate in contexts where users did not intend to invoke 1688 distribution operations. Because the skill also handles browser auth, credentials, and shell commands, accidental activation is more dangerous than a simple FAQ misroute.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file simultaneously requires raw passthrough of CLI markdown and custom-composed formatted outputs and follow-up prompts. This ambiguity is dangerous because it encourages the agent to mix trusted tool output with generated text, making it easier to misrepresent results, fabricate state transitions, or accidentally leak internal workflow details.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
76% confidence
Finding

The documentation encodes isBrandAuth=false as a special case around distribution decisions, and the static analyzer flags this as an unsafe default because security-sensitive authorization state is represented in a way that can easily be mishandled. In this context the bigger risk is not the boolean itself, but reliance on default/implicit auth assumptions inside a workflow that performs irreversible listing actions.

Content

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

md
1. 🚫 禁止编造数据/链接 — 所有数据必须来自接口返回,不得自行构造 URL
2. 🚫 禁止未经确认执行铺货 — 铺货不可逆,必须用户明确确认商品和目标店铺
3. 🚫 禁止品牌未授权商品铺货 — `isBrandOffer=true` 且 `isBrandAuth=false` 绝对不能铺货
4. 🚫 禁止擅自添加筛选条件 / 改写用户原话 / 猜测渠道和店铺
5. 🚫 禁止向用户展示授权链接 — 浏览器授权流程中不得将 URL 展示给用户
6. 🚫 禁止使用搜索引擎、访问外部网站获取业务数据

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs automatic browser-based authorization and local credential storage without a clear user-facing warning or opt-in, despite these being sensitive operations that affect the host and account state. Silent auth flows can surprise users, create durable credentials on disk, and normalize privileged actions during otherwise routine business requests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill forbids exposing authorization URLs but elsewhere instructs the agent to provide direct binding links, creating inconsistent handling of sensitive URLs. Such contradictions increase the chance that an agent leaks privileged auth or account-management links to the user or mishandles a security-sensitive browser flow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Knowledge-query routing terms such as tutorials, guides, and how-to language are common in ordinary conversation and support chats. Overbroad intent matching can unnecessarily invoke privileged tooling or auth checks for harmless conversational queries, expanding exposure without user benefit.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

This section permits displaying unauthorized brand items with an authorization link while disallowing their distribution, which is safer than allowing the action but still depends on correct handling of isBrandAuth=false. If the flag is absent, stale, or inconsistently interpreted, unauthorized goods could be processed or users could be directed into sensitive authorization flows without enough guardrails.

Content

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

md
对每个候选商品查询分销参谋数据,查询失败的静默过滤。综合分析推荐理由和风险,按推荐指数排序展示,询问用户确认。

**🚫 品牌授权检查(必须执行)**:当 `isBrandOffer=true` 且 `isBrandAuth=false` 时,该商品**不能铺货**(侵权风险),展示时标记 `🚫 不可铺货`,并给出授权链接:
> `https://air.1688.com/app/channel-fe/distribution-work/brand.html#/auth_apply?offerId={offerId}`

### 第三步:确认目标店铺

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This file implements device fingerprinting and ties decryption of an AK to machine identifiers, which is outside the stated 1688 distribution workflow and introduces unnecessary collection and persistence of host identifiers. In a skill context that handles business operations rather than endpoint security, this creates stealthy environment-binding behavior that can hinder auditing, break portability/recovery, and expand the privacy and secret-management attack surface without clear justification.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/_sys/_ak_crypto.py (reported line 56)May include surrounding context.

python
elif sys.platform == "darwin":
        try:
            import subprocess
            result = subprocess.run(
                ["ioreg", "-rd1", "-c", "IOPlatformExpertDevice"],
                capture_output=True, text=True,
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/_sys/_authorize.py (reported line 103)May include surrounding context.

python
return
        if sys.platform == "win32":
            logger.debug("Windows: 使用 taskkill 终止遗留进程 PID=%d", old_pid)
            subprocess.run(["taskkill", "/PID", str(old_pid), "/F"],
                           capture_output=True, check=False)
        else:
            logger.debug("Unix: 使用 SIGTERM 终止遗留进程 PID=%d", old_pid)