Back to skill

Security audit

跨境电商产品合规速查

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Chinese-language compliance lookup/report generator with no hidden privilege, persistence, credential use, or remote execution, though generated HTML should be sanitized before opening or sharing.

Install only if you are comfortable with a Chinese-language, reference-based compliance assistant. Treat its output as preliminary guidance and verify current requirements with official regulators or a qualified compliance provider. If generating HTML reports from free-form product names or shared inputs, ensure the agent escapes inserted values or converts reports to a safer sanitized format before opening or distributing them.

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

Warning
Location
assets/report-template.html:199
Finding

Unescaped User-Controlled Values in Generated HTML Report

Content
View full analysis

{{PRODUCT}}

{{MARKET}} — 出口合规报告
{{GEN_DATE}}
{{RISK_LEVEL}}
``` The corresponding workflow identifies product category and destination market from user-controlled messages without defining output-encoding requirements: ```md - `category` — 产品品类,映射到上述 8 大品类之一 - `market` — 目的地市场,映射到上述 8 大市场之一 (或 GCC 中的具体国家) - `platform` (可选) — 平台名称 (如亚马逊/速卖通/Temu/Coupang),用于额外要求标注 ``` ### Technical Analysis The report template places dynamic values directly into HTML text and attribute contexts. The Skill does not require HTML escaping, sanitization, or strict allowlist validation before replacing these placeholders. In particular: - `PRODUCT`, `MARKET`, `GEN_DATE`, and `RISK_LEVEL` are inserted into HTML text contexts. - `RISK_CLASS` is inserted into an HTML attribute context. - Product and market information originates from the user's message. - The template contains active JavaScript and is intended to be opened as an interactive HTML document. If the report generator performs direct string replacement, characters such as `<`, `>`, `"`, `'`, and `&` can alter the document structure. An attacker could close the intended element and insert an event handler or another executable HTML construct. The vulnerability is contingent on dynamic values being copied into the template without contextual encoding, which the current Skill contract neither prevents nor detects. ### Attack Path 1. An attacker supplies a crafted product name or market value, for example: ```html

``` 2. The Skill e ...[truncated 1421 chars]

Remediation
View remediation
`, `"`, and `'`. - Apply attribute-specific encoding to values used inside attributes. 2. **Constrain values to fixed enumerations** - Map product categories and markets to internal identifiers and canonical display names. - Do not copy arbitrary user-provided text into the template when a fixed category or market name is available. - Allowlist `RISK_CLASS` to known values such as `risk-high`, `risk-medium`, and `risk-low`. 3. **Use safe DOM construction** - Populate dynamic fields with `textContent` rather than `innerHTML`. - Construct tables, cards, and checklist entries through DOM APIs. - If formatted HTML is genuinely required, sanitize it with a mature HTML sanitizer configured to reject scripts, event attributes, dangerous URL schemes, SVG, and other active content. 4. **Add a restrictive Content Security Policy** - Block remote resources and unsolicited network destinations. - Avoid permitting arbitrary inline script execution. - Move the existing inline JavaScript into a local script file or authorize it with a cryptographic hash or nonce. - A suitable baseline is: ```http Content-Security-Policy: default-src 'none'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'; connect-src 'none'; base-uri 'none'; form-action 'none' ``` 5. **Add security regression tests** - Test every placeholder with closing tags, quotes, event handlers, script tags, SVG payloads, and `javascript:` URLs. - Verify that malicious values appear only as literal visible text. - Validate the completed HTML before delivery and reject unexpected active elements or event-handler attributes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to activate on many generic compliance or export questions, which can cause the skill to be invoked outside a narrowly intended scope. In this skill, that matters because it may present jurisdiction-specific regulatory guidance as authoritative for loosely matched queries, increasing the chance of misrouting users to incomplete or inapplicable compliance advice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML document hard-codes lang="zh-CN", which enforces a specific language/locale for the generated report. Under the policy, locale constraints should either be user-selectable or clearly documented as justified for a region-specific tool; this file itself does not provide that opt-in or justification.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file is written entirely in Chinese from the title onward, and it does not indicate that Chinese is optional or that the resource is intended only for a Chinese-speaking audience. Under the policy rule for language or locale constraints, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill instructs generation of interactive HTML for user consumption without any safety guidance on rendering untrusted content. If user-provided fields or database content are inserted into the HTML without escaping, this creates a plausible path for script injection or unsafe active content in the rendered report.

Content

No source excerpt is available for this finding.