Back to skill

Security audit

唯品会用户登录

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to implement Vipshop QR login, but it needs Review because it stores reusable login cookies for broad local and cross-skill use with limited scoping controls.

Install only if you are comfortable with this skill saving a Vipshop login session on disk for later reuse by other Vipshop skills. Treat ~/.vipshop-user-login/tokens.json like an active login cookie, use logout when finished, and prefer installing dependencies in an isolated environment with pinned or reviewed versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Permit Unreviewed Package Releases

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-4
Related Documentation: SKILL.md:310-314
Vulnerability Type: Unpinned dependencies and non-reproducible installation
Risk Level: Medium

Vulnerable Code

requirements.txt:1-4:

text
requests>=2.28.0
qrcode>=7.0
Pillow>=9.0.0
packaging>=21.0

SKILL.md:310-314:

bash
pip install requests qrcode Pillow

Technical Analysis

The dependency specifications define only minimum versions and do not impose upper bounds, exact versions, or package hashes. Consequently, every installation may resolve to different and potentially unreviewed future releases. The installation command in SKILL.md is even less restrictive because it installs the latest versions directly rather than using a reviewed lock file.

This does not prove that any current dependency is malicious. The security weakness is that the project has no mechanism to guarantee dependency integrity or reproduce an audited dependency set. If an allowed package release or its publishing account is compromised, installation or import-time behavior could execute attacker-controlled Python code with the privileges of the user running the Skill.

The affected packages are imported by the login workflow, which handles a reusable PASSPORT_ACCESS_TOKEN and stores it under ~/.vipshop-user-login/tokens.json. A compromised dependency would therefore execute in a process with access to the Skill's authentication state and other resources available to that operating-system user.

Attack Path

  1. An attacker compromises the publishing account, release infrastructure, or distribution artifact of one of the permitted dependencies.
  2. The attacker publishes a version satisfying the open-ended >= constraint.
  3. A user installs the Skill dependencies using pip install -r requirements.txt or follows the less restrictive `pip install requests qrcode Pillo ...[truncated 1204 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace minimum-version constraints with exact versions that have been reviewed and tested:

    text
    requests==REVIEWED_VERSION
    qrcode==REVIEWED_VERSION
    Pillow==REVIEWED_VERSION
    packaging==REVIEWED_VERSION
    
  2. Generate and maintain a lock file containing hashes for every direct and transitive dependency. Install it with hash verification:

    bash
    python -m pip install --require-hashes -r requirements.lock
    
  3. Update SKILL.md so users install only from the reviewed lock file rather than invoking unconstrained package installation:

    bash
    python -m pip install --require-hashes -r requirements.lock
    
  4. Use an automated dependency-update process that creates reviewed changes when versions or hashes change. Run vulnerability scanning and regression tests before accepting each update.

  5. Configure installation to use the official or an organization-controlled package index, and avoid untrusted extra indexes that could introduce dependency-confusion packages.

  6. Run the Skill in a dedicated virtual environment under a non-administrative account to reduce the impact of a compromised dependency.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill should implement a complete Vipshop QR-code login workflow and save authenticated state for reuse. The supplied code chunk does none of that. It is a standalone logging compatibility stub with no side effects and no login-related logic, resource access, triggers, or persistence. This is a material description-behavior mismatch because the actual code's primary purpose is unrelated to the declared account-login functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a complete Vipshop扫码登录 workflow. The supplied code does something materially different: it implements a mars_cid device ID generator and a DeviceManager that stores this identifier locally. While mars_cid may be a supporting component for Vipshop requests, this chunk does not perform the declared primary behavior of authenticating a user. It does not access login endpoints, create or display a QR code, poll for authorization, or persist login tokens to the declared file. Therefore the description does not accurately represent the actual behavior of this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description promises an end-to-end QR login skill, including QR acquisition, user presentation, polling for scan/confirmation, and saving the resulting login state for reuse. The supplied code chunk only covers QR initialization and image retrieval/presentation. It interacts with Vipshop QR endpoints and writes QR image files to ~/.vipshop-user-login/qr_codes, which is consistent with part of the stated flow, but there is no code for checking whether the QR was scanned/approved, no login completion handling, and no token persistence to ~/.vipshop-user-login/tokens.json. Therefore the code behavior materially under-implements the declared primary purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents capabilities that involve network access, shell execution, environment inspection, and file reads/writes, but it does not declare any explicit tool scope or permission boundaries. In an agent setting, this increases the risk of over-privileged execution, making it easier for the skill to access local files or invoke commands beyond what is strictly required for QR login.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger conditions include a broad fallback such as activating when another skill detects the user is not logged in and needs guidance. Over-broad activation can cause the login skill to run without a clear user request, potentially prompting unnecessary authentication flows or exposing QR login prompts in unrelated contexts.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
72% confidence
Finding

The documentation instructs use of npx clawhub update vipshop-skills --force without pinning a specific version. Unpinned package execution can lead to supply-chain risk if a malicious or compromised upstream version is published, especially when users are encouraged to run it manually.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
72% confidence
Finding

A second unpinned reference to npx clawhub repeats the same supply-chain exposure: users may execute whatever version is current at invocation time. Repetition in security-sensitive login tooling raises the chance that operators will follow the unsafe pattern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly instructs that login cookies will be retained and reused during and after QR-code authentication, but it does not pair that behavior with any user-facing warning, consent, or guidance on secure local storage. In this skill’s context, the saved login state is intended for reuse by other Vipshop skills, so omission of privacy and session-handling safeguards increases the risk of silent cross-skill account access or local credential theft.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide explicitly documents saving reusable authenticated cookies and user identifiers in a predictable plaintext file under the user's home directory, but it does not warn that this data is equivalent to an active login session and may expose the user's account if read by other local skills, users, or processes. In this skill context, the stored file is intentionally meant for cross-skill reuse, which increases the attack surface and makes unauthorized account access more likely if filesystem permissions or skill isolation are weak.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The integration examples instruct other skills to load saved authentication cookies and send authenticated requests to vip.com, including account-info endpoints, without any requirement for user notice, re-consent, or scope limitation. Because this skill is specifically a shared login utility for other skills, the omission is more dangerous than generic sample code: it normalizes silent reuse of a user's authenticated session across unrelated actions and skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains user-facing natural-language documentation entirely in Chinese, including usage guidance and function descriptions, with no indication that the skill is region-specific or that another language is available. Under the policy rule for language/locale constraints, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The request headers hard-code Accept-Language to 'zh-CN,zh;q=0.9,en;q=0.8', which imposes a specific language/locale preference in all requests. This is a natural-language policy concern because the skill does not offer user opt-in or explain why a Chinese locale is required.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a QR-code login flow that fetches a QR code, shows it to the user, polls for confirmation, and saves login state. Spawning external viewers with open, xdg-open, or os.startfile goes beyond simple QR retrieval/display logic and introduces a local app-launch capability not explicitly justified by the stated purpose.

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/qr_code_client.py (reported line 234)May include surrounding context.

python
system = platform.system()
            
            if system == 'Darwin':  # macOS
                subprocess.run(['open', str(file_path)], check=True)
            elif system == 'Linux':
                subprocess.run(['xdg-open', str(file_path)], check=True)
            elif system == 'Windows':

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/qr_code_client.py (reported line 236)May include surrounding context.

python
if system == 'Darwin':  # macOS
                subprocess.run(['open', str(file_path)], check=True)
            elif system == 'Linux':
                subprocess.run(['xdg-open', str(file_path)], check=True)
            elif system == 'Windows':
                os.startfile(str(file_path))
            else:

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring says this method returns a valid access_token string, but TokenInfo.access_token is hardcoded to return "" for compatibility. As a result, callers receive an empty string rather than an actual token, which contradicts the documented behavior of the method.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a narrowly scoped skill that performs QR-code login, polls for confirmation, and saves login state for other Vipshop skills. This file also exposes management functions to list stored logins, inspect stored login status, and delete stored tokens via CLI flags, which are separate account-management capabilities not described in the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

该行要求 AI 以固定的 Markdown 图片语法并使用中文替代文本“唯品会登录二维码”直接展示给用户,体现了固定语言输出要求。文件中未说明可根据用户语言偏好切换文案,也未提供语言选择或 opt-in。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

All natural-language instructions and interface descriptions in the file are presented only in Chinese, with no indication that users can choose another language or that the locale restriction is intentional and justified. The rule requires flagging language or locale policy violations when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens reproducibility and makes it impossible to ensure the installed version is not one with known security issues, especially for a package like requests used for network communication and authentication flows.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0
qrcode>=7.0
Pillow>=9.0.0
packaging>=21.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Requests has multiple known advisories, but because the manifest does not pin a specific version, there is no way to verify whether deployed environments will receive a patched release. In this skill, requests is likely central to QR login polling and token handling, so a vulnerable version could affect credential confidentiality or transport security.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The qrcode package is not pinned to an exact version, which means installations are not reproducible and may unexpectedly pull a vulnerable or breaking release. While this package is lower risk than network-facing libraries, unpinned dependencies still increase supply-chain uncertainty.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.28.0
qrcode>=7.0
Pillow>=9.0.0
packaging>=21.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Pillow is unpinned despite a history of security advisories, including issues affecting image parsing. In a skill that generates or handles QR-code images for login, leaving Pillow version selection open increases the chance of installing an affected version or encountering unsafe transitive behavior.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests>=2.28.0
qrcode>=7.0
Pillow>=9.0.0
packaging>=21.0

Unverifiable Dependency: Pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Pillow has known security issues, including flaws in image parsing and resource handling, and the current requirement does not guarantee a safe version. Because this skill displays QR codes and may process image data, an affected Pillow release could expose the application to denial of service or worse depending on the vulnerability.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The packaging library is also specified as a floating minimum version, reducing reproducibility and making dependency state harder to audit. Even if not directly high risk in this skill, unpinned packages contribute to avoidable supply-chain exposure.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
requests>=2.28.0
qrcode>=7.0
Pillow>=9.0.0
packaging>=21.0

Static analysis

No suspicious patterns detected.