Back to skill

Security audit

古董鉴定估价

Security checks for vulnerabilities and agentic risk

Overview

The skill is broadly coherent as a Chinese antique appraisal assistant, but it needs review because it combines payment guidance with generated HTML reports that do not define safe handling of user-provided content.

Review before installing. Use it only if you want a Chinese-language antique appraisal/payment-style workflow, verify any real merchant or payment destination before paying, and avoid opening generated reports unless the platform escapes or sanitizes user-supplied text and renders the HTML in a sandboxed viewer.

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:251
Finding

Unsanitized Placeholder Substitution in Generated HTML Reports

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:186-201; vulnerable output sinks in assets/report-template.html:6, 251-256, 302, 310, 318, 326, 333
Vulnerability Type: HTML injection with potential script execution
Risk Level: Medium

Vulnerable Code

SKILL.md:186-201 instructs the agent to replace template placeholders with appraisal data but does not require contextual output encoding or sanitization:

markdown
### 4.2 Report Generation Method

Use `assets/report-template.html` as the template and replace its placeholders with actual appraisal data.

Supported template placeholders:
- `{item_name}` - Item name
- `{item_type}` - Item type
- `{era_judgment}` - Era assessment
- `{condition_rating}` - Condition rating
- `{price_low}` - Lower appraisal estimate
`{price_high}` - Upper appraisal estimate
- `{appraisal_details}` - Detailed appraisal text
- `{market_analysis}` - Market analysis
- `{expert_advice}` - Collecting advice
- `{risk_notes}` - Risk notes
- `{report_date}` - Report date
- `{order_id}` - Order identifier

The corresponding raw insertion points include:

html
<title>Collection Appraisal Report - {item_name}</title>

<div class="info-item"><span class="label">Item Name</span><span class="value">{item_name}</span></div>
<div class="info-item"><span class="label">Item Type</span><span class="value">{item_type}</span></div>
<div class="info-item"><span class="label">Era Assessment</span><span class="value">{era_judgment}</span></div>
<div class="info-item"><span class="label">Condition Rating</span><span class="value">{condition_rating}</span></div>
<div class="info-item"><span class="label">Report Number</span><span class="value">{order_id}</span></div>
<div class="info-item"><span class="label">Report Date</span><span class="value">{report_date}</span></div>
html
<div class="analysis-text" style="margin-top:16px;">
  {market_analysis}
</
...[truncated 2800 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat every placeholder value as untrusted, including model-generated prose derived from user input.
  2. Apply context-sensitive HTML encoding to all plain-text fields. At minimum, encode &, <, >, ", and ' before substitution.
  3. Do not insert raw narrative strings as HTML. Prefer DOM text nodes or a template engine with automatic escaping enabled by default.
  4. If limited formatting is required, process rich-text fields through a maintained allowlist sanitizer. Permit only necessary elements and attributes; reject scripts, event attributes, embedded content, unsafe SVG, CSS injection, and dangerous URL schemes.
  5. Generate {expert_advice} from a structured array and create each list element safely rather than accepting a complete raw HTML fragment.
  6. Add strict validation for structured fields such as scores, prices, dates, and order identifiers.
  7. Add a restrictive Content Security Policy, for example one that denies scripts, plugins, frames, network connections, and form submissions unless explicitly required.
  8. Serve or preview generated reports from an isolated origin and use a sandboxed viewer without same-origin privileges.
  9. Add security tests using payloads in every placeholder and verify that they are displayed as inert text rather than parsed as executable markup.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes broad phrases like '帮我看看' and '值多少钱', which can appear in many unrelated conversations and may cause unintended activation of the skill. This can hijack user flow, collect unnecessary personal or image data, and start payment-oriented workflows without clear user intent for antique appraisal.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill metadata and content are entirely Chinese-centric and imply Chinese-language operation without checking the user's language preference. This can cause unintended activation or misunderstood payment/legal disclaimers for users who do not read Chinese, reducing informed consent and increasing the risk of erroneous actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The environment detection logic relies on asking the user or inferring context, but the criteria are underspecified and default to the Web/WorkBuddy path. Ambiguous detection can lead to the wrong rendering path, including generating HTML or payment UX unsuitable for the actual client, which increases the chance of confusion, mis-clicks, or unsafe presentation behavior.

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 root sets lang="zh-CN", which fixes the report locale to Simplified Chinese for all users. The file does not indicate that this is optional, user-selected, or justified as a region-specific template, so it creates a language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains only Chinese-language instructional content and does not indicate that users may select another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the natural-language policy rule, forcing a specific language without user opt-in can be a locale/language policy violation.

Content

No source excerpt is available for this finding.