Back to skill

Security audit

拼多多研究员

Security checks for vulnerabilities and agentic risk

Overview

The skill fits its Pinduoduo research purpose, but its generated HTML reports can execute injected browser code from untrusted report data and also load third-party chart code.

Review before installing. The skill is not trying to access credentials or install persistence, but generated reports should be treated as active web pages: do not open or share reports built from untrusted search-derived data until the generator escapes all fields, validates style/class values, protects inline JSON, and removes or secures the CDN dependency.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_report.py:24
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
拼多多研究报告 - {data.get('query', '')} | PDD Researcher {get_css()}
{build_header(data)} {build_score_dashboard(data)} {build_dimension_cards(data)} {build_charts_section(data)} {build_insights_section(data)} {build_action_plan(data)} {build_footer(data)}
""" ``` Multiple values are inserted directly into HTML text and attribute contexts: ```python def build_header(data): query = data.get("query", "拼多多分析") analysis_type = data.get("analysis_type", "综合研究") created_at = data.get("created_at", datetime.now().strftime("%Y-%m-%d %H:%M")) data_source = data.get("data_source", "WebSearch + 公开信息") return f"""

🔍 拼多多研究报告

{analysis_type} · {query}
📅 {created_at} 📊 {data_source} 🏷️ 拼多多
""" def build_score_dashboard(data): score_data = data.get("scores", {}) overall = score_data.get("overall", {}) score_val = overall.get("value", 0) score_class = "high" if score_val >= 75 else ("medium" if score_val >= 50 else "low") verdict = overall.get("verdict ...[truncated 5950 chars]
Remediation
View remediation
`, `&`, and the relevant Unicode separators. 6. Add a restrictive Content Security Policy. Prefer external, locally hosted scripts and disallow inline script execution. A nonce- or hash-based policy may be used where inline code cannot immediately be removed. 7. Add regression tests containing payload-like values in every report field and confirm that they appear only as inert text in the generated document. 8. Treat all search-derived material as untrusted, even when it comes from apparently reputable public sources. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description presents a full-featured research assistant that accepts business inputs and automatically completes broad Pinduoduo e-commerce analysis. The actual code chunk is a presentation-layer utility: it loads an existing JSON file, formats fields into HTML, and initializes charts from already-provided data. While HTML report generation is consistent with one part of the description, the primary declared capability is end-to-end research and analysis, and none of that analytical or data-access functionality appears in this code. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger section activates on any request that clearly points to Pinduoduo research and gives examples like “帮我看看拼多多上XXX” and “拼多多XXX卖得怎么样,” which overlap with ordinary shopping or browsing requests. The file does not provide negative examples or constraints distinguishing lightweight questions from full skill activation, making invocation scope ambiguous.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction “中文为主” imposes a language preference on outputs, and the file does not indicate that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill content is written only in Chinese and does not indicate any user opt-in, language selection, or locale limitation. Under the policy, forcing a specific language without user choice can be a natural-language policy violation unless the regional constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural language that fixes the skill's interface and output to Chinese, including the module description and usage context. The policy requires language choice or a clearly documented justification for locale constraints, and neither is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The report template forces the HTML locale to zh-CN and all visible labels are written in Chinese, which imposes a specific language/locale on users. Because the file does not provide a language selection mechanism or a documented justification for this restriction, this is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated HTML loads Chart.js from a third-party CDN at runtime, which creates a supply-chain and privacy exposure not implied by a purely local JSON-to-HTML conversion tool. If the CDN resource is tampered with, blocked, or swapped, opening the report can execute untrusted JavaScript in the viewer's browser and leak access patterns or report context to an external party.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest and overview repeatedly position the skill as focused on a single platform ('只做拼多多' / '专注拼多多单一平台'), but the workflow explicitly calls for searching external Chinese content platforms and even international-market analysis to supplement results. While web search is expected for research, the documented behavior goes beyond platform-specific Pinduoduo analysis into broader cross-source market research.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The top-level documentation says the script reads analysis JSON and generates a professional visual HTML report, which suggests a local file transformation. In practice, the HTML includes a remote script dependency at L030, so the documentation omits and effectively misstates that opening the report executes externally hosted code.

Content

No source excerpt is available for this finding.