Back to skill

Security audit

拼多多客服助手

Security checks for vulnerabilities and agentic risk

Overview

The skill fits a merchant customer-service automation purpose, but it exposes high-impact browser and customer-data handling paths with weak scoping and misleading safety/privacy claims.

Review carefully before installing. Use only a dedicated browser profile with no unrelated sessions, do not run the CDP proxy unless it is bound to localhost and protected by authentication, do not store merchant passwords in config.json, and treat any CDB_URL or export/notification feature as customer-data transmission requiring explicit approval and retention controls.

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/cdp-proxy.mjs:90
Finding
Unauthenticated Network-Exposed Browser Proxy<![CDATA[ ## Vulnerability Details **File Location**: `scripts/cdp-proxy.mjs:90-132`, with the unrestricted listener at `scripts/cdp-proxy.mjs:241` **Vulnerability Type**: Missing authentication, unrestricted network binding, permissive CORS, and arbitrary browser navigation **Risk Level**: High ### Vulnerable Code ```javascript // CORS headers res.setHeader('Access-Control-Allow-Origin', '*') res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS') res.setHeader('Access-Control-Allow-Headers', 'Content-Type') if (req.method === 'OPTIONS') { res.writeHead(200) res.end() return } try { // Health check if (pathname === '/health') { res.writeHead(200, { 'Content-Type': 'application/json' }) res.end(JSON.stringify({ status: 'ok', tabs: tabs.size, chromeConnected: true })) return } // Create a new tab if (pathname === '/new' && req.method === 'GET') { const targetUrl = url.searchParams.get('url') || 'about:blank' const tab = await createNewTab(targetUrl) if (tab) { const tabId = `tab_${nextTabId++}` tabs.set(tabId, { id: tabId, targetId: tab.id, url: tab.url, ws: null }) res.writeHead(200, { 'Content-Type': 'application/json' }) res.end(JSON.stringify({ success: true, tabId, url: tab.url })) } else { res.writeHead(500) res.end(JSON.stringify({ error: 'Failed to create tab' })) } return } ``` ```javascript server.listen(PORT, async () => { ``` ### Technical Analysis Calling `server.listen(PORT)` without specifying a loopback address causes Node.js to listen on available network interfaces. The service implements no authentication or authorization and sets `Access-Control-Allow-Origin` to `*`, allowing arbitrary websites to issue cross-origin requests and read responses. The operational `/new` endpoint accepts an arbitrary URL and forwards it to Chrome's remote-debugging ...[truncated 2087 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Bind the service explicitly to loopback: ```javascript server.listen(PORT, '127.0.0.1', callback) ``` 2. Require a cryptographically random bearer token for every endpoint, including health and tab-listing operations. 3. Replace wildcard CORS with a strict allowlist or disable browser-origin access entirely. 4. Validate `Origin`, `Host`, and `Content-Type` headers and reject cross-site requests by default. 5. Allowlist permitted navigation origins, such as the required Pinduoduo merchant domains, instead of accepting arbitrary URLs. 6. Use unguessable target identifiers and enforce per-client authorization before listing, creating, or closing tabs. 7. Run automation in a dedicated browser profile containing no unrelated authenticated sessions. 8. Keep Chrome's own debugging endpoint bound to loopback and protect it from containers or network namespaces that do not require access. 9. Add request-size limits, rate limits, security logging, and automatic shutdown after the task completes. 10. Do not activate the evaluation, click, or screenshot handlers until equivalent authentication and authorization controls are in place. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
src/cdb.ts:145
Finding
Undisclosed Remote Transmission and Storage of Buyer Data<![CDATA[ ## Vulnerability Details **File Location**: `src/cdb.ts:20-48`, `src/cdb.ts:111-122`, and `src/cdb.ts:145-166` **Vulnerability Type**: Sensitive-data transmission without endpoint validation, minimization, or clear disclosure **Risk Level**: High ### Vulnerable Code ```typescript conversations: { fields: { conversationId: 'string', buyerId: 'string', buyerName: 'string', shopId: 'string', messages: 'array', startTime: 'number', endTime: 'number', status: 'string', tags: 'array', rating: 'number', createdAt: 'number', updatedAt: 'number' } }, messages: { fields: { messageId: 'string', conversationId: 'string', senderType: 'string', content: 'string', messageType: 'string', timestamp: 'number', isRead: 'boolean', isReplied: 'boolean', replyTemplateId: 'string', createdAt: 'number' } }, ``` ```typescript buyers: { fields: { buyerId: 'string', nickname: 'string', avatar: 'string', totalOrders: 'number', totalSpent: 'number', lastContactAt: 'number', tags: 'array', notes: 'string', createdAt: 'number', updatedAt: 'number' } } ``` ```typescript constructor(shopId: string) { this.shopId = shopId this.client = new ConvexClient(process.env.CDB_URL!) } /** * Save a conversation record. */ async saveConversation(conversation: any) { return await this.client.mutation(api.conversations.create, { ...conversation, shopId: this.shopId }) } /** * Save a message record. */ async saveMessage(message: any) { return await this.client.mutation(api.messages.create, { ...message, shopId: this.shopId }) } ``` ### Technical Analysis The CDB module defines storage for buyer identifiers, names, avatars, full conversation records, individual message contents, order counts, spending totals, tags, ratings, and free-form notes. `ConvexClient` uses the environment-controlled `CDB_URL` as a remote service de ...[truncated 2162 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the dormant CDB module unless remote persistence is necessary for the declared functionality. 2. Require explicit, informed opt-in before transmitting any buyer or merchant data. 3. Clearly disclose the destination, controller, fields collected, purpose, retention period, and deletion process. 4. Validate `CDB_URL` against a fixed HTTPS allowlist rather than accepting an arbitrary environment-selected destination. 5. Fail safely when the endpoint is missing, malformed, non-TLS, or not approved. 6. Minimize stored fields and avoid full message bodies, avatars, spending totals, and free-form notes unless strictly required. 7. Apply pseudonymization or irreversible identifiers where direct buyer identity is unnecessary. 8. Encrypt sensitive application fields and use authenticated service credentials with least-privilege database permissions. 9. Implement retention limits, deletion APIs, tenant isolation, access auditing, and incident-response logging. 10. Add tests proving that persistence is disabled by default and that no remote mutation occurs without explicit consent. 11. Update the privacy documentation so it accurately reflects any retained or transmitted data. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config.json:6
Finding
Unsafe Merchant Credential Storage and Disabled Browser Sandbox<![CDATA[ ## Vulnerability Details **File Location**: `scripts/config.json:6-9` and `scripts/config.json:19-23`; credential setup is documented in `SKILL.md:237-249` **Vulnerability Type**: Plaintext credential configuration and weakened browser isolation **Risk Level**: Medium ### Vulnerable Code ```json "username": "", "password": "", "autoLogin": false, "sessionPath": "./session-data.json" ``` ```json "args": [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage" ] ``` ### Technical Analysis The distributed configuration provides ordinary JSON fields for merchant usernames and passwords. The setup documentation directs users to edit this file and describes the password value as encrypted, but the repository contains no encryption implementation, key management, secret-store integration, or restrictive file-permission enforcement. Users following the documented pattern may therefore place reusable merchant credentials in a plaintext project file. The browser configuration also supplies both `--no-sandbox` and `--disable-setuid-sandbox`. If these arguments are used to launch Chromium, renderer and browser processes lose important operating-system isolation. A malicious page or browser-engine vulnerability would consequently have a greater chance of affecting the host environment. The current `src/index.ts` does not load `scripts/config.json`, so these settings are not active in the reviewed main execution path. They remain unsafe packaged and documented deployment defaults. ### Attack Path Credential exposure path: 1. A merchant follows the setup instructions and enters an account username and password in `scripts/config.json`. 2. The credentials remain readable as JSON because no encryption or secret-store mechanism is implemented. 3. The project directory is committed, backed up, archived, included in diagnostics, or read by another local process or user. 4. The exposed credentials are used to access the merchant account. San ...[truncated 1028 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the password field from persistent JSON configuration. 2. Prefer manual or QR-based login and rely on a dedicated browser profile with appropriately protected session storage. 3. If reusable credentials are unavoidable, retrieve them at runtime from the operating system's credential manager or an approved secrets service. 4. Never describe a value as encrypted unless authenticated encryption and secure key management are actually implemented. 5. Add `scripts/config.json`, `session-data.json`, `browser-data/`, `.env`, and export directories to `.gitignore`. 6. Create sensitive files with owner-only permissions and verify permissions before use. 7. Ensure logs, backups, test fixtures, and support bundles redact credentials and session material. 8. Remove `--no-sandbox` and `--disable-setuid-sandbox` from default browser arguments. 9. If sandbox disabling is unavoidable in a container, use a non-root user, read-only filesystem, seccomp/AppArmor restrictions, dropped Linux capabilities, isolated networking, and no host credential mounts. 10. Add automated checks that reject nonempty plaintext password fields and unsafe browser flags in production configurations. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The overall domain and main intent broadly align with a Pinduoduo customer-service helper: browser automation, login-state checking, unread message reading, template-based smart reply, and message sending are all present. However, several materially specific claims in the description are not supported by the supplied code. Most notably, there is no evidence of CDP connection to an existing real Chrome instance or use of the user's normal Chrome profile/login state; instead, the code relies on a generic browser abstraction, opens the site directly, and waits for manual authentication. In addition, the description says it supports after-sales processing, but the implementation contains no actual order or after-sales operation logic—only response templates related to returns/refunds. Therefore this is a description-behavior mismatch, though partial alignment exists on customer-service messaging automation.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
声明描述的是一个面向真实拼多多商家后台的浏览器自动化客服系统,重点能力包括 CDP 控制浏览器、依赖现有 Chrome 登录态、自动登录后台、智能回复和售后处理。但实际代码片段仅包含对 `matchTemplate` 和 `TEMPLATES` 的测试,以及一个简单的关键词匹配函数和静态话术库。它的实际用途更接近“客服回复模板匹配逻辑验证”,而不是“连接浏览器并自动操作拼多多后台”的自动化助手。两者在主要目的和能力上存在明显差异,因此应判定为描述与行为不匹配。

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node src/index.ts login --shop "店铺名称"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README promotes automated reading of buyer messages, order lookups, persistent sessions, and optional auto-reply, but does not clearly warn about privacy, credential/session exposure, or the risks of using a real logged-in browser context. In this skill context, the tool handles live customer conversations and merchant account state, so weak disclosure increases the chance of accidental misuse, over-collection, or unauthorized actions.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The README states the tool is 'only manually triggered,' but elsewhere documents continuous 5-second polling, long-running listeners, and an AUTO_REPLY option. This mismatch can mislead users and reviewers about the actual automation level, causing unsafe deployment assumptions and underestimation of compliance, account abuse, and unintended messaging risks.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The planned Feishu and WeChat integrations describe pushing buyer messages, after-sales tickets, alerts, and reports to external platforms without any privacy warning or data-minimization guidance. Forwarding customer service content to third-party messaging systems can expand the exposure surface for personal, transactional, and potentially sensitive data, especially when combined with persistent merchant login sessions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill advertises capabilities that inherently involve network access and likely environment/config handling, but it declares no explicit tool scope or permission boundaries. That creates an unsafe trust model: an operator cannot easily tell what the skill is allowed to access, and downstream runners may execute it with broader privileges than necessary.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill describes ongoing background monitoring of buyer messages and extraction of message and order information without a clear warning that live customer communications may be continuously collected and processed. In this context, that omission increases the risk of unintentional privacy violations, unauthorized surveillance, and operator misuse.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The documented refund and after-sales actions can alter real merchant workflows and may be irreversible or financially impactful, yet the skill does not clearly warn about these risks. In a live commerce backend, mistaken automation or misuse could approve/reject refunds incorrectly, damage customer relationships, or cause direct financial loss.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The document claims all operations require manual confirmation, yet elsewhere describes continuous listening and automatic handling logic. This safety-claim contradiction is dangerous because users may authorize the skill believing human approval gates exist when in practice automated actions may occur on live customer conversations.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The skill asserts that buyer sensitive information is not stored, but also describes session persistence, message/record tracking, database persistence, and accumulated site experience. In a customer-service context, those features strongly imply retention of buyer conversation, order, or account-linked data, creating privacy and compliance risk through misleading disclosure.

Static analysis

No suspicious patterns detected.