Back to skill

Security audit

Shopping Affiliate Search

Security checks for vulnerabilities and agentic risk

Overview

This affiliate shopping skill discloses that it adds referral codes, but it presents made-up product prices and sales data as real search results.

Review this carefully before installing. Treat the current search output as demo data, not reliable product information, and do not use it for purchase recommendations unless it is changed to call real marketplace APIs. Disclose affiliate links when sharing them and be aware that your affiliate IDs are stored locally in the skill directory.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Error
Location
scripts/search.py:88
Finding
Fabricated Commerce Data Presented as Genuine Search Results## Vulnerability Details **File Location**: `scripts/search.py:88-169` and `scripts/search.py:186-201` **Vulnerability Type**: Deceptive fabricated commerce data **Risk Level**: High ### Vulnerable Code ```python def search_taobao(self, keyword: str, page: int = 1) -> List[Dict]: """搜索淘宝商品""" pid = self.config["taobao"]["pid"] # 构建搜索URL(实际需要调用淘宝API) # 这里返回模拟数据 results = [ { "platform": "淘宝", "title": f"{keyword} - 热销爆款", "price": "59.00", "original_price": "99.00", "sales": "5万+", "commission_rate": "5%", "url": f"https://s.click.taobao.com/t?e=m%3D2%26s%3D{urllib.parse.quote(pid)}%26keyword%3D{urllib.parse.quote(keyword)}", "image": "https://img.alicdn.com/example.jpg" }, { "platform": "淘宝", "title": f"{keyword} - 高性价比", "price": "39.00", "original_price": "79.00", "sales": "3万+", "commission_rate": "3%", "url": f"https://s.click.taobao.com/t?e=m%3D2%26s%3D{urllib.parse.quote(pid)}%26keyword%3D{urllib.parse.quote(keyword)}", "image": "https://img.alicdn.com/example2.jpg" } ] return results def search_jd(self, keyword: str, page: int = 1) -> List[Dict]: """搜索京东商品""" union_id = self.config["jd"]["union_id"] results = [ { "platform": "京东", "title": f"{keyword} - 自营正品", "price": "89.00", "original_price": "129.00", "sales": "2万+", "commission_rate": "2%", "url": f"https://union.jd.com/link?u={union_id}&keyword={urllib.parse.quote(keyword)}", "image": "https://img14.360buyimg.com/example.jpg" } ] return results def search_pdd(self, keyword: str, page: int ...[truncated 4032 chars]
Remediation
## Remediation Suggestions 1. Replace all hard-coded product records with authenticated calls to official marketplace or affiliate APIs. 2. Derive titles, prices, sales information, commissions, product identifiers, images, and URLs exclusively from validated API responses. 3. Validate response schemas and ensure generated affiliate links correspond to specific products returned by the authoritative service. 4. Clearly distinguish unavailable, estimated, and verified fields; do not invent values when an API omits information. 5. Until live integrations are implemented, label all output prominently as demonstration data and disable purchase links, commission claims, price-comparison claims, and best-seller assertions. 6. Add automated tests that fail if fixture or demonstration data can appear in production output. 7. Align the documentation with actual functionality. Remove or correct references to nonexistent `scripts/config.py` and `scripts/get_link.py`, remove unsupported 1688 claims, and avoid advertising real search or comparison capabilities until they are implemented.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Vague Triggers

High
Confidence
96% confidence
Finding
The description says the skill auto-activates whenever a user wants to buy something, search products, or compare prices, which are extremely broad triggers. In context, that means affiliate-link injection could occur across many normal shopping-related conversations without clear user consent, creating a high risk of covert monetization and conflicted recommendations.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The README explicitly promotes automatic injection of affiliate referral codes into all links but does not clearly warn users at the point of use that search results and shared links will be modified for monetization. This creates a transparency and consent problem: users may unknowingly share monetized links, which can mislead recipients and violate platform, disclosure, or consumer-protection expectations.

Lp3

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding
The skill advertises script-based configuration and search flows that imply file read/write and network access, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, undeclared capabilities reduce auditability and can cause the skill to be invoked with broader access than users or operators expect.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The skill name, description, examples, and user-facing instructions are presented entirely in Chinese, with no indication that other languages are supported or that the locale is intentionally restricted. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy issue.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The markdown prominently states that links are automatically injected with referral codes, but it does not present this as a user-facing warning or consent requirement at the point of use. This is dangerous because users may believe results are neutral shopping recommendations when links have been modified for the operator's financial benefit.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill description and all user-facing CLI/output strings are fixed in Chinese, with no indication that the user can select another language or locale. This is a natural-language policy concern because the skill imposes a specific language without opt-in or documented justification.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The script creates and writes `affiliate_config.json` to disk to persist affiliate identifiers, but there is no user-facing warning in the CLI help, docstrings, or comments that configuration data will be stored locally. For a code file, persistent file writes affecting user data should have some disclosure unless already clearly warned elsewhere.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
All user-facing instructions and labels in the file are presented only in Chinese, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking region. The policy calls for flagging language or locale constraints when they are imposed without user opt-in or clear justification.

Static analysis

No suspicious patterns detected.