Back to skill

Security audit

唯品会用户登录

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Vipshop QR-login skill, but it stores reusable account cookies locally, so users should treat the saved token file like a password.

Install only if you are comfortable letting this skill create ~/.vipshop-user-login/tokens.json for reuse by other Vipshop skills. Keep that file private, avoid sharing terminal logs that may contain QR tokens or QR URLs, use logout/removal when finished, and prefer pinned dependencies or a reviewed lockfile when installing.

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 and Dynamically Resolved Update Tool

Content
View full analysis

Vulnerability Details

File Locations:

  • requirements.txt:1-4
  • SKILL.md:95
  • SKILL.md:100
  • SKILL.md:313

Vulnerability Type: Supply-chain exposure through unpinned dependencies and dynamically resolved package execution
Risk Level: Medium

Vulnerable Code and Instructions

requirements.txt:1-4:

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

SKILL.md:95:

text
- If a new version is detected, the script only prompts the user to update manually through the controlled release process. It does not automatically execute an update command or remotely download and overwrite local files. The prompt provides the command `npx clawhub update vipshop-skills --force` for manual execution.

SKILL.md:100:

text
2. If the script reports a new version, the AI must instruct the user to update manually through the controlled release process and may relay the command `npx clawhub update vipshop-skills --force`; the latest version can be viewed at https://github.com/vipshop/vipshop-ai-skills

SKILL.md:313:

bash
pip install requests qrcode Pillow

Technical Analysis

The Python dependencies use minimum-version constraints rather than exact, reviewed versions. The documented installation command is even less restrictive because it omits all version constraints and integrity hashes. A future installation can therefore resolve package versions that were not part of this audit.

The suggested npx clawhub update vipshop-skills --force command also omits an exact CLI version. Depending on the local environment and package-manager behavior, npx may resolve and download a package dynamically before executing it. This makes the effective update tooling mutable after the Skill has been reviewed.

This is a supply-chain weakness rather than evidence that the currently declared packages are malicious. No malicious dependency, typosqua ...[truncated 2171 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin every Python dependency to an exact, reviewed version instead of using lower bounds:

    text
    requests==<reviewed-version>
    qrcode==<reviewed-version>
    Pillow==<reviewed-version>
    packaging==<reviewed-version>
    
  2. Generate and commit a lock file containing hashes for every direct and transitive dependency. Install with integrity enforcement, for example:

    bash
    python -m pip install --require-hashes -r requirements.lock
    
  3. Change SKILL.md so its installation instructions reference the reviewed lock file rather than installing package names without versions.

  4. Pin the clawhub CLI to a reviewed version and trusted registry source. Avoid allowing npx to resolve an unspecified package version at execution time.

  5. Prefer a preinstalled and integrity-verified update tool. If dynamic installation is unavoidable, verify the package version, provenance, signature, and integrity before execution.

  6. Run dependency updates through a controlled review process that includes vulnerability scanning, provenance verification, lock-file regeneration, tests, and a new security review before release.

  7. Execute installation and update operations without administrator privileges and in an isolated environment, such as a dedicated virtual environment or sandbox, to reduce the impact of a compromised package.

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 (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Claiming a full QR-code authentication capability while only implementing token persistence/management creates a dangerous trust gap: other skills may rely on this one for authentication state integrity even though it does not actually establish that state. In a multi-skill ecosystem, that can lead to confused-deputy problems, stale or forged state reuse, and unsafe assumptions around user identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Claiming a full QR-code authentication capability while only implementing token persistence/management creates a dangerous trust gap: other skills may rely on this one for authentication state integrity even though it does not actually establish that state. In a multi-skill ecosystem, that can lead to confused-deputy problems, stale or forged state reuse, and unsafe assumptions around user identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Claiming a full QR-code authentication capability while only implementing token persistence/management creates a dangerous trust gap: other skills may rely on this one for authentication state integrity even though it does not actually establish that state. In a multi-skill ecosystem, that can lead to confused-deputy problems, stale or forged state reuse, and unsafe assumptions around user identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Claiming a full QR-code authentication capability while only implementing token persistence/management creates a dangerous trust gap: other skills may rely on this one for authentication state integrity even though it does not actually establish that state. In a multi-skill ecosystem, that can lead to confused-deputy problems, stale or forged state reuse, and unsafe assumptions around user identity.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares broad capabilities in practice (environment access, file read/write, network, and shell-related behavior) but does not explicitly scope or constrain them with a permissions/allowed-tools section. In an agent setting, this weakens policy boundaries and can lead to unintended execution paths, local state modification, or network activity beyond what a login-only skill should need.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger condition includes a broad fallback such as activating when other skills detect an unauthenticated state, which can cause the login skill to auto-trigger in contexts the user did not explicitly request. For a skill that stores reusable login state, overly broad invocation increases the chance of surprise authentication prompts and unnecessary collection/persistence of sensitive session material.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that login state will be persisted and reused across other skills, but it does not provide a clear, prominent user warning about that cross-skill token sharing. In an authentication context, insufficient disclosure can lead users to unknowingly grant long-lived access beyond the immediate task, increasing privacy and account-compromise risk if the file is later accessed by other components.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
82% confidence
Finding

The documentation instructs use of npx clawhub update vipshop-skills --force without pinning a specific version. If followed, this can pull whatever package version is current at execution time, creating a supply-chain risk where a compromised or breaking upstream release is installed.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
82% confidence
Finding

A second unpinned npx clawhub reference repeats the same supply-chain exposure: downstream users or agents may execute a mutable package install/update path. Repetition increases the chance the unsafe command is treated as normal operating procedure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document explicitly states that login success results in cookies automatically containing authentication credentials, but it does not pair that behavior with any warning about account access, session persistence, or the sensitivity of stored login state. In this skill’s context, that omission is security-relevant because the skill is designed to save authenticated state for reuse by other skills, increasing the chance that users or downstream components treat long-lived session material as routine data rather than sensitive credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document instructs other skills to persist and reuse authentication cookies, including PASSPORT_ACCESS_TOKEN, in a predictable plaintext file under the user's home directory without any warning about the sensitivity of those credentials. Those cookies are effectively bearer tokens for the user's account, so local disclosure, accidental logging, or reuse by other components could enable account takeover or unauthorized access to personal data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The integration guide provides step-by-step instructions for loading saved authentication cookies and attaching them to outbound requests to vip.com, but it does not warn that this causes any consuming skill to act as the user and transmit live authentication data over the network. In this skill ecosystem context, that omission is dangerous because other skills can easily inherit powerful authenticated access without clear consent, scope limitation, or auditing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstrings label the operation as 'secure encryption' even though the function only performs deterministic string manipulation and checksum-like replacement. Misrepresenting a non-cryptographic transform as encryption can cause other developers to treat the value as protected or secret, leading to unsafe design assumptions in authentication, storage, logging, or transport decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code writes a stable device identifier to a user config file without any visible disclosure or consent mechanism. In the context of an account-login skill, persistent identifiers can enable long-term correlation of user activity across sessions and may be sensitive from a privacy and transparency standpoint even if not directly secret.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code prints the qrToken directly to stdout, which can expose login-related state in terminal scrollback, logs, agent transcripts, or monitoring systems. Even if the token is short-lived, leaking authentication artifacts unnecessarily increases the chance of session hijack or replay within its validity window.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill writes untrusted network-provided bytes to disk and automatically hands the file to the OS default opener, which crosses a trust boundary and can trigger risky handler behavior in external applications. In an agent-skill context, silently launching local applications is more dangerous because it expands capability beyond simple QR retrieval and may surprise users or create an attack surface through malformed content or unsafe file associations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill persists QR login images under the user's home directory without an explicit warning or strict lifecycle controls. These files may remain accessible to other local users, backups, indexing tools, or forensic collection, unnecessarily preserving login artifacts beyond the active session.

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:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The session headers hard-code Accept-Language: zh-CN,zh;q=0.9, which imposes a specific locale preference on all requests. For this code file, that is a natural-language locale policy concern because there is no user opt-in or documented reason that the skill must always operate in Chinese.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The TokenInfo.access_token property explicitly returns an empty string for compatibility, while get_valid_token advertises and attempts to return a meaningful valid access token. This is an active contradiction between the code documentation/intended API contract and what the implementation actually provides.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The _emit_qr_stdout_payload function prints the raw qrToken and QR login URL to stdout inside machine-readable markers. In agent, terminal-sharing, CI, or logged environments, stdout is commonly captured, making these login artifacts available to other processes or viewers who could poll or complete the login flow and hijack the session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script persists authentication cookies, including PASSPORT_ACCESS_TOKEN, to a predictable location under ~/.vipshop-user-login/tokens.json without explicit consent, encryption, or evidence of permission hardening in this file. On multi-user systems, developer workstations, or environments with backups/log collectors, these tokens can be copied and reused to impersonate the user until expiry.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill whose purpose is to run the QR login flow and save login state for other Vipshop skills. This file also implements management functions to list stored logins, inspect saved token state, and remove stored tokens, which go beyond merely obtaining and saving a login session.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with only a lower bound, so builds may resolve to different versions over time, including versions with undisclosed regressions or known vulnerabilities. In a login skill that handles authentication state, dependency drift reduces supply-chain integrity and makes security posture hard to verify or reproduce.

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

Static analysis

No suspicious patterns detected.