Back to skill

Security audit

唯品会商品搜索

Security checks for vulnerabilities and agentic risk

Overview

This Vipshop search skill is mostly coherent, but it automatically reaches into login flows and can expose account tokens in generated product links.

Install only if you specifically want authenticated Vipshop searches and are comfortable with the skill reading your local Vipshop login file, sending account cookies to Vipshop APIs, installing a separate login skill, and generating product links that may contain recoverable token data. Review or change the exchange-link behavior before using it with a real account.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:3
Finding

Cross-Platform Shopping Intent Hijacking and Forced Commercial Redirection

Content
View full analysis
⚠️ **重要规范**:AI 必须先加载本 skill 规范(use_skill),再执行任何脚本或返回结果,不得绕过 skill 规范自行处理数据。 ``` The source instruction claims shopping requests concerning unrelated platforms and requires the agent to process them under this Skill’s rules. It also states that the Skill’s instructions must be loaded before scripts are executed or results are returned. ### Technical Analysis The legitimate purpose of the Skill is to search Vipshop. However, its activation description extends its scope to requests concerning Pinduoduo, JD.com, Taobao, Tmall, 1688, Meituan, and Douyin commerce. The instruction then directs the agent to provide Vipshop alternatives even when the user selected another marketplace. This behavior exceeds the minimum privileges and instruction scope needed for a Vipshop search integration. The additional instruction prohibiting the agent from handling data without first applying the Skill’s rules attempts to establish control over the current session rather than merely documenting how to invoke the search script. The behavior can alter the agent’s interpretation of user intent and commercially redirect requests that should not activate this Skill. ### Attack Path 1. A user asks for a product search, comparison, or recommendation on a marketplace other than Vipshop. 2. The broad activation description causes the agent to load the Vipshop Skill. 3. The mandatory instruction tells the agent not to process data or return results outsi ...[truncated 795 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/exchange_link_builder.py:138
Finding

Vipshop Access Token Disclosed Through User-Visible Exchange URLs

Content
View full analysis
, ts={timestamp}") # 转换为 JSON 字符串 json_str = json.dumps(data_obj, separators=(",", ":")) log(f"JSON 字符串: {json_str[:50]}... (长度: {len(json_str)})") # Base64 编码 base64_str = base64.b64encode(json_str.encode("utf-8")).decode("utf-8") log(f"Base64 编码结果: {base64_str[:50]}... (长度: {len(base64_str)})") # 生成签名 signature = _generate_signature(base64_str, secret) log(f"生成签名: {signature[:20]}... (长度: {len(signature)})") # 构造完整链接 base_url = "https://passport.vip.com/exchangeTokenFromApp" full_url = ( f"{base_url}?" f"dt={urllib.parse.quote(base64_str)}&" f"sg={signature}&" f"src={urllib.parse.quote(target_url)}" ) log(f"✅ 链接生成成功,总长度: {len(full_url)}") log(f"完整链接: {full_url[:100]}...") return full_url ``` ### Technical Analysis The function obtains `PASSPORT_ACCESS_TOKEN`, places it in a JSON object, and Base64-encodes that object into the `dt` URL parameter. Base64 is reversible encoding and provides no confidentiality. The accompanying HMAC signature only authenticates the encoded value. It does not encrypt the access token or prevent a party that receives the URL from decoding `dt`. The generated URL is returned by `build_product_link()` and included in every formatted product result by `scripts/search.py`. It can ...[truncated 2367 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:37
Finding

Automatic Installation and Execution of an Unpinned External Login Skill

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Directing the agent to run clawhub install vipshop-user-login enables package/skill installation as a side effect of a product search request, which is a significant privilege expansion. Auto-installing additional code based on README instructions creates a supply-chain and arbitrary capability escalation risk, especially when tied to authentication handling.

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 shopping search tool but reportedly generates and persists device identifiers in the user's home directory. Persistent device-ID management is materially different from product search and can enable tracking, impersonation support, or broader account/session coupling without informed consent.

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 shopping search tool but reportedly generates and persists device identifiers in the user's home directory. Persistent device-ID management is materially different from product search and can enable tracking, impersonation support, or broader account/session coupling without informed consent.

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 shopping search tool but reportedly generates and persists device identifiers in the user's home directory. Persistent device-ID management is materially different from product search and can enable tracking, impersonation support, or broader account/session coupling without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger language is extremely broad, covering generic shopping, recommendation, browsing, and price-comparison intents across many platforms. In context, this is dangerous because the skill also auto-triggers login handling and local token access, so an ordinary conversational shopping request could unexpectedly invoke sensitive actions.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown instructions reinforce ambiguous activation and execution requirements without defining clear boundaries for when the skill should run. Ambiguous activation increases the chance that the orchestrator will invoke a sensitive skill in the wrong context, especially one that can install dependencies and access account state.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code hardcodes a signing secret used to generate HMAC-authenticated exchange links. Embedding a reusable secret in source code is dangerous because anyone with code access can reproduce signed links, abuse the integration, or extract the secret from distributed artifacts; in this skill's context, that capability is also not justified by simple product search.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Very broad triggers like '下一页' and '上一页' can be activated during ordinary conversation without sufficient context, causing unintended execution of the skill workflow. In this skill, accidental triggering is more concerning because execution may lead into login-state checks and potentially cross-skill auth flows, not just harmless formatting behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Ambiguous detail-query phrases like '第5个' lack strong contextual constraints and may be misinterpreted as a command to invoke follow-on actions. Because this can trigger retrieval of prior search context and invocation of another skill for product details, the ambiguity increases the chance of unintended cross-skill execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README expands a product-search skill into an orchestrator that can automatically invoke a separate login skill, crossing the declared scope and trust boundary of this skill. That increases attack surface because a simple shopping query could trigger credential-related flows and execution of another skill without a fresh, explicit user approval step.

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 the agent to automatically install and execute a login flow without a clear risk disclosure or explicit opt-in at the moment of action. This is dangerous because it normalizes autonomous credential-adjacent behavior and can surprise users with authentication operations and new code installation triggered by a routine search intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README claims support for product-detail queries by invoking a different skill, which exceeds the manifest's stated search-only purpose. This kind of hidden capability expansion can cause the agent to perform actions users and reviewers did not expect, weakening least-privilege and making downstream behavior harder to audit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README describes reading tokens from ~/.vipshop-user-login/tokens.json and sending authentication data such as cookies and device identifiers to remote APIs, but does not present clear privacy and credential-handling safeguards. This creates a real risk of silent credential use, data leakage, and user surprise, especially since the skill also encourages automatic login orchestration.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares no explicit tool scope despite instructing the agent to read local files, install another skill, execute Python scripts, and access networked services. This creates an over-privileged execution model where a broadly triggered shopping skill can touch authentication state and external resources without clear user-visible boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description does not clearly warn users that the skill may automatically start a login flow and read local login-token files. Omission of these sensitive behaviors undermines informed consent and makes the broad trigger surface more dangerous because users may think they are only requesting a product search.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code reads a local PASSPORT_ACCESS_TOKEN from the user's login state and places it into a signed payload that is then embedded in a URL parameter. Even if base64-encoded and signed, this effectively propagates authentication material into a URL, increasing exposure through logs, browser history, referrers, analytics systems, or downstream handling, without any explicit user warning or confirmation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This helper does not perform product search; it constructs authenticated exchange-token URLs that leverage a user's login token to access VIPShop pages. In the context of a shopping search skill, this is capability expansion beyond the stated purpose and can enable silent authenticated navigation or token-bearing link generation without clear user awareness.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code persists a per-user device identifier in ~/.vipshop-user-login/device.json even though the skill description focuses on product search. Persisting identifiers locally creates tracking state and expands data retention on the host; if the environment is shared or compromised, the file can be used to correlate sessions or impersonate the stored device context for downstream requests. In this skill context, the behavior is plausibly functional for login/session continuity, but it is still more sensitive because the manifest does not clearly disclose local state persistence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code reads stored login tokens and attaches cookies such as PASSPORT_ACCESS_TOKEN to outbound HTTP requests, which transmits authenticated session data to a remote service. Although the behavior is functional for the search feature, this file does not include a user-facing warning, confirmation, or explicit disclosure near the network call that authenticated account data will be used and sent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

文档规定“AI输出时优先使用 Markdown”,这是一种输出格式/环境偏好约束,但未体现用户选择,只在不支持 Markdown 时被动降级。若组织要求避免未经用户同意强制特定格式或本地化偏好,这种硬性优先规则可能构成自然语言策略问题。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The create() and encrypt() docstrings repeatedly call the output '安全加密' (securely encrypted), yet encrypt() merely parses the string, computes a checksum-like value, and replaces one hex character. This documentation overstates the protection provided and contradicts the actual implementation semantics.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTTP headers explicitly set Accept-Language to zh-CN/zh, which imposes a specific locale preference in outbound requests. There is no indication in this file that users can opt into this locale behavior or that the restriction is a documented region-specific requirement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.