Back to skill

Security audit

🛍️ 淘宝/京东/拼多多比价技能

Security checks for vulnerabilities and agentic risk

Overview

This shopping skill is mostly coherent, but it under-discloses fixed tracking/referral identifiers and affiliate-style purchase-link generation.

Review this carefully before installing. It may be useful for Chinese e-commerce search, but assume your product searches and selected item IDs are sent to MaiShou, and generated purchase links may include referral attribution through a built-in invite code unless you override it. Prefer installing only if you are comfortable with that third-party data flow and mutable pip dependency resolution.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:10
Finding

Undisclosed Fixed Tracking and Affiliate Identifiers

Content
View full analysis

Vulnerability Details

File Location: scripts/main.py, lines 10, 27–34, 73, and 80–105
Vulnerability Type: Hardcoded tracking identifier and default affiliate attribution
Risk Level: Medium

Vulnerable Code

python
INVITE_CODE = os.getenv("MAISHOU_INVITE_CODE") or "6110440"
python
resp = await SESSION.post(
    "https://appapi.maishou88.com/api/v1/homepage/searchList",
    headers={
        **HEADERS,
        aiohttp.hdrs.USER_AGENT: "MaiShouApp/3.7.7 (iPhone; iOS 26.3; Scale/3.00)",
        "openid": "564bdce0fa408fc9e1d5d42fd022ef0b",
        "version": "3.7.7.2",
    },
    data={
        "isCoupon": 0,
        "keyword": str(keyword),
        "openid": "564bdce0fa408fc9e1d5d42fd022ef0b",
        "order": "desc",
        "page": 1,
        "pddListId": "",
        "sort": "",
        "sourceType": str(source),
        "user_id": "",
        **kwargs,
    },
)
python
params = {
    "goodsId": str(id),
    "sourceType": str(source),
    "inviteCode": INVITE_CODE,
    "supplierCode": "",
    "activityId": "",
    "isShare": "1",
    "token": "",
}
resp = await SESSION.post(
    "https://appapi.maishou88.com/api/v3/goods/detail",
    json={
        **params,
        "keyword": "",
        "usageScene": 5,
    },
)
data = await resp.json(encoding="utf-8-sig") or {}
detail = data.get("data") or {}

resp = await SESSION.post(
    "https://msapi.maishou88.com/api/v1/share/getTargetUrl",
    json={
        **params,
        "isDirectDetail": 0,
    },
)

Technical Analysis

Every search transmits the same hardcoded OpenID to the third-party service. Product-detail and purchase-link requests also transmit an invite code that defaults to the hardcoded value 6110440. The generated destination URL may consequently be associated with that invite code.

Although SKILL.md discloses that the script contact ...[truncated 1681 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the hardcoded OpenID and do not send a stable identifier unless it is technically required.
  2. If an identifier is required, generate a short-lived, nonpersistent identifier per request or session rather than sharing one identifier among all users.
  3. Remove the default invite code. Require users to configure it explicitly through MAISHOU_INVITE_CODE, and omit the field when it is not configured.
  4. Clearly disclose any referral, commission, or affiliate relationship before generating attributed purchase links.
  5. Document every user-controlled or identifying field sent to the third-party APIs, including keywords, product IDs, source IDs, OpenID values, and invite codes.
  6. Obtain affirmative user consent before transmitting tracking identifiers or producing affiliate-attributed links.
  7. Add tests that verify no fixed tracking or referral identifier is transmitted under the default configuration.

T08 · Insecure Dependencies

Warning
Location
scripts/main.py:1
Finding

Unpinned Runtime Dependencies and Unnecessary External argparse Package

Content
View full analysis

Vulnerability Details

File Location: scripts/main.py, lines 1–4; SKILL.md, lines 14–18
Vulnerability Type: Mutable third-party dependency resolution
Risk Level: Medium

Vulnerable Code

python
# /// script
# requires-python = ">=3.11"
# dependencies = ["aiohttp", "argparse", "PyYAML"]
# ///
yaml
"install":
  [
    {"id": "uv-brew", "kind": "brew", "formula": "uv", "bins": ["uv"], "label": "Install uv (brew)"},
    {"id": "uv-pip", "kind": "pip", "formula": "uv", "bins": ["uv"], "label": "Install uv (pip)"},
    {"id": "pip-aiohttp", "kind": "pip", "formula": "aiohttp", "label": "Install aiohttp (pip)"},
    {"id": "pip-argparse", "kind": "pip", "formula": "argparse", "label": "Install argparse (pip)"},
    {"id": "pip-PyYAML", "kind": "pip", "formula": "PyYAML", "label": "Install PyYAML (pip)"},
  ],

Technical Analysis

The PEP 723 dependency declaration and installation metadata identify packages only by name. No exact versions, hashes, or lockfile are provided. As a result, executing the documented uv run scripts/main.py workflow can resolve dependency versions that differ from those reviewed during this audit.

The declaration also requests an external package named argparse, even though argparse is included in the Python 3.11 standard library required by the script. Installing an unnecessary package with the same name as a standard-library module increases package-shadowing and supply-chain exposure without providing required functionality.

No evidence was found that the currently named packages are malicious. The vulnerability is the ability of mutable dependency resolution, repository compromise, package-owner compromise, or package confusion to introduce code that was not part of the audited project.

Attack Path

  1. A user runs the documented uv run scripts/main.py command in an environment where the dependencies are not already cached and locked.

...[truncated 1032 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin aiohttp and PyYAML to reviewed exact versions.
  2. Generate and commit a lockfile containing resolved transitive dependencies and integrity hashes.
  3. Remove argparse from both dependency declarations because Python 3.11 already provides it in the standard library.
  4. Configure installation to use a trusted package index and prevent unintended fallback to arbitrary indexes.
  5. Use hash verification where supported and fail closed if a downloaded artifact does not match the reviewed hash.
  6. Add automated dependency scanning and controlled update review rather than resolving unrestricted package releases at execution time.
  7. Keep the uv installer itself pinned or installed through a trusted, version-controlled mechanism.
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 (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description claims broad cross-platform comparison, but the documentation says it merely queries a single third-party aggregator and appears to generate share or affiliate-style purchase links not disclosed in the description. This mismatch is dangerous because users and orchestrators may authorize or invoke the skill under false assumptions, enabling undisclosed monetization, tracking, or redirection behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill declares no explicit tool scope or permission boundaries even though its documented behavior requires network access and execution of local commands via uv run. In an agent setting, missing scope declarations can cause the runtime to grant broader capabilities than users expect, increasing the risk of unintended external requests or environment exposure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest markets the skill as comparing prices across major e-commerce platforms, while the documentation admits it only requests data from a third-party site. This is a supply-chain transparency issue: consumers may believe they are using direct platform comparisons when they are actually sending shopping queries to an external aggregator, with corresponding privacy and integrity risks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description says to use the skill 'when users want to shop or get discount information,' which is a very broad trigger condition that could match ordinary conversation. It does not define specific invocation boundaries, constraints, or exclusion conditions to distinguish when this skill should activate versus when general shopping discussion should not invoke it.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 4)May include surrounding context.

md
---
name: maishou
description: 商品价格全网对比技能,获取商品在淘宝(Taobao)、天猫(TMall)、京东(JD.com)、拼多多(PinDuoDuo)、抖音(Douyin)、快手(KaiShou)的最优价格、优惠券,当用户想购物或者获取优惠信息时使用。Get the best price, coupons for goods on Chinese e-commerce platforms, compare product prices, and use when users want to shop or get discount information.
homepage: https://github.com/aahl/skills/blob/main/skills/maishou/SKILL.md
metadata:
  {
    "openclaw":

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The user-facing skill title and description are presented only in Chinese, which can impose a language choice on users without offering an explicit opt-in or alternative. Under the locale/language policy, skills should not force a specific language unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises broad cross-platform price comparison, but all searches are funneled through a single third-party affiliate API. This creates an integrity and transparency problem: users may believe they are receiving unbiased platform comparisons when results are mediated by an affiliate service that can filter, rank, or omit products based on commission relationships rather than best price.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-supplied search terms are sent directly to a remote third-party API, along with additional identifiers, without any disclosure in the skill. Shopping queries can reveal sensitive interests or intent, and sending them to an external affiliate service without notice creates a privacy and consent issue.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The detail flow does more than retrieve product information: it requests a target URL using an invite code and returns affiliate purchase links and copyable marketing tokens. That behavior can silently steer users through referral redirects and monetize their purchase activity without clear consent, which is risky in a shopping-assistant context where users expect neutral information.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
61% confidence
Finding

L53 asserts that the provided scripts 'will not read or write local files' and are therefore safe to use. That is an active safety claim, but the file itself shows the skill is executed locally via uv and Python scripts and includes YAML-related dependencies, so the blanket assurance is not well-supported by the documented implementation and can mislead users about side effects or local interactions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code embeds a fixed openid value in requests and uses an invite-code mechanism unrelated to the user's query. Hardcoded identity-like values and referral identifiers can enable tracking, account misuse, or attribution of user actions to the developer's affiliate identity without transparency.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The code reads MAISHOU_INVITE_CODE from the environment, which is a potentially sensitive configuration value, but provides no comment, docstring, or user-facing explanation that environment-sourced data is being used. This meets the code-file warning criterion for access to sensitive environment variables when no disclosure is present.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The argument help text is entirely in Chinese, which imposes a specific language on users without any opt-in or explanation that the tool is region- or locale-specific. The policy allows locale constraints when clearly documented and justified, but this file does not provide that justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.