Back to skill

Security audit

唯品会图片搜索

Security checks for vulnerabilities and agentic risk

Overview

The skill performs VIPShop image search, but it reuses a saved login token to generate returned product links without clear disclosure.

Review before installing. Use only with a VIPShop account and non-sensitive images, and avoid sharing generated product links or transcripts because those links may contain encoded session-token data. The publisher should remove token-bearing URLs, redact raw outputs, and require explicit consent before reading saved login state or uploading images.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/exchange_link_builder.py:151
Finding

Reusable Authentication Token Disclosed in Generated Product Links

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/exchange_link_builder.py:38
Finding

Hard-Coded Exchange-Link Signing Secret Embedded in the Skill

Content
View full analysis
str: """ Get secret key Returns: Secret key string """ return "5fb86e55b72bfc50f083049130e5e76a75c2cbda6bbd6e51d59668057f5c1715" ``` ### Technical Analysis The HMAC signing key is embedded directly in distributed source code. Every user, auditor, package mirror, or attacker who obtains the Skill can recover the same key and independently generate HMAC-MD5 signatures accepted by code using this signing convention. A cryptographic secret distributed to untrusted clients cannot provide meaningful proof that a request originated from an authorized signer. It also cannot be independently protected per installation, and rotating it requires replacing or updating every deployed copy of the Skill. This problem compounds the authentication-token disclosure in the preceding finding. If an attacker obtains a valid token or encoded payload, possession of the embedded secret allows the attacker to reproduce signatures for payloads constructed according to the same format. Whether such signatures are accepted for unauthorized server-side operations depends on Vipshop's validation and token controls. ### Attack Path 1. An attacker downloads or reads the Skill package. 2. The attacker extracts the hard-coded key from `_get_secret()`. 3. The attacker reproduces the documented signing operation: ```python hmac.new(secret.encode("utf-8"), data.encode("utf-8"), hashlib.md5) ``` 4. The attacker constructs Base64 payloads and generates matching signatures without using an authorized signing service. 5. If the relevant Vipshop endpoint treats possession of this shared secret as proof of authorization, and the attacker also has a valid token, the attacker can attempt to create forged exchange links. ### Impact Assessme ...[truncated 561 chars]
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 (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior claims a benign image-search workflow, but the finding indicates the actual capability includes reading local login tokens and generating signed exchange-token links rather than just performing product search. This mismatch is dangerous because it can conceal credential handling or session-linked operations behind an innocuous description, preventing users and policy systems from accurately assessing risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file's primary behavior is generating authenticated exchange-token links for product detail pages, which does not match the declared image-search functionality of the skill. That mismatch is risky because hidden credential-handling and account-linked URL generation can enable unauthorized account-context use and indicates capability beyond what users and reviewers would expect.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to read a local token file and make outbound network requests, but it declares no explicit tool scope or permissions boundary. In an agent environment, missing capability declarations weaken policy enforcement and user visibility, increasing the chance of unintended file access or external data transmission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill can be triggered by broad, everyday phrases, which raises the risk of accidental invocation in unrelated conversations. Because this skill reads local files, checks login state, and uploads images to external endpoints, accidental triggering can cause unintended data access or transmission without sufficiently clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Very short triggers like '找同款' or '以图搜图' are ambiguous and may match normal user language without enough context to justify invoking a skill that accesses local resources and external services. In this skill's context, vague invocation is more dangerous because the workflow includes token-file checks and image upload, not just passive formatting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow describes local image handling and remote API calls but does not clearly warn users that their local images and derived metadata will be uploaded to third-party VIPShop endpoints. This omission undermines informed consent and may expose sensitive personal or proprietary image content and associated search metadata.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction to always display all returned data encourages indiscriminate disclosure of upstream response contents, which may include account identifiers, session-related fields, internal URLs, or other sensitive metadata. In a login-dependent skill, unconditional full output materially increases the chance of leaking secrets or privacy-sensitive information back to the user or logs.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Including an unrestricted '原始数据' passthrough in the output schema creates a direct path for leaking sensitive upstream API response contents, including account-linked metadata, hidden fields, or temporary access parameters. This is especially risky here because the skill depends on authenticated state and may interact with token-derived links or session-bound responses.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The FAQ states '不支持,仅支持本地图片文件上传方式', which denies image-URL input. However, the workflow earlier instructs the AI to call the script with --image-url for pagination, so the documentation contradicts itself about accepted input modes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code reads a local authentication token from the user's home directory and uses it to construct an exchange URL, which can transfer authenticated session context into generated links. This is dangerous because it accesses sensitive credentials outside the stated image-search purpose and may expose or misuse the user's login state without explicit consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code silently reads a user login token from disk and places token-derived data into a generated URL without any user-facing notice or approval. URLs are commonly logged, shared, cached, or leaked via referrers, so using authentication material in this way increases the chance of credential exposure or unintended authenticated actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill reads persisted login tokens from ~/.vipshop-user-login/tokens.json and uses them to authenticate requests, which is sensitive credential access. Even if needed for logged-in image search, silently harvesting tokens from a home-directory file creates an unnecessary trust boundary violation and can expose user credentials to unrelated skill logic or future abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill accesses stored login tokens from the user's home directory without informing the user that credentials will be read and reused. Undisclosed access to authentication material is dangerous because it normalizes secret scraping and prevents users from making an informed trust decision.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill uploads local image content to a remote VIP.com endpoint and also processes arbitrary image URLs against external APIs without any user-facing disclosure or confirmation. Images can contain sensitive personal or commercial information, so silent transmission to third-party services creates a privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The upload request forces the locale via 'Language/zh_CN' in the User-Agent, and later requests prefer 'zh-CN' in Accept-Language, with no user opt-in or configurability. This can violate language/locale policy expectations when a skill imposes a specific locale rather than allowing user choice or clearly documenting that it is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The request headers explicitly prefer 'zh-CN,zh' before English, which imposes a locale preference in outbound requests. The file does not provide any mechanism for user selection or explain that this is a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The product search request sets Accept-Language to prefer Chinese, but the skill does not ask the user for locale preference or explain the restriction. This is a natural-language policy concern because the skill silently enforces a language/locale choice.

Content

No source excerpt is available for this finding.