Back to skill

Security audit

Vague Requirement Unpacker

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PM requirement-unpacking assistant, but its optional HTML report can turn untrusted requirement text into active web page content if generated naively.

Review before installing if you plan to use HTML output with untrusted or externally supplied requirement text. Markdown output is lower risk. If HTML reports are used, ensure user-provided and model-derived text is escaped or sanitized before opening, sharing, or hosting the report.

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
references/report-template-pro.html:6
Finding

Unescaped User-Controlled Content in Generated HTML Reports

Content
View full analysis

Vulnerability Details

File Location: references/report-template-pro.html:6, 100-101, 131, 150, 157, 174, 196-197; required generation behavior is defined in SKILL.md:158-162
Vulnerability Type: HTML injection and potential cross-site scripting
Risk Level: Medium

Vulnerable Code

html
<title>模糊需求接招包 · __requirement_title__</title>

<h1 class="hero-title">__requirement_title__</h1>
<p class="hero-desc">__one_line_summary__</p>

<div class="finding">__verbatim__</div>

<tbody>__question_rows__</tbody>

__layer_sections__

<pre class="flow">__main_flow__</pre>

<div class="finding">
  <div class="dim">30 秒版</div>
  __reply_short__
</div>
<div class="finding">
  <div class="dim">稍正式版</div>
  __reply_formal__
</div>

The associated instructions require use of this template and verbatim reproduction of the supplied requirement:

markdown
HTML 输出必须使用本技能自己的 [references/report-template-pro.html](references/report-template-pro.html)。

- 原话复述,不改写原意

Technical Analysis

The HTML report template places user-controlled or model-derived values directly into HTML text, title, table-body, and raw fragment contexts. Neither the template nor the Skill instructions require contextual HTML escaping, allowlist sanitization, or safe DOM construction.

The original requirement is explicitly required to be reproduced without changing its meaning. Consequently, markup embedded in a requirement can reach __verbatim__. Derived fields such as __requirement_title__, question rows, layer sections, flow content, and response scripts may propagate the same attacker-controlled text into additional contexts.

A payload such as:

html
<img src=x onerror=alert(document.domain)>

could become an active element when substituted into a raw body placeholder. A context-breaking payload can target the title element:

html
</title><script>alert(document.domain)</script><title>

The row and section placeholders are especially sensitive because the ...[truncated 1796 chars]

Remediation
View remediation

Remediation Suggestions

  1. Escape every scalar value according to its HTML context.

    • At minimum, encode &, <, >, ", and '.
    • Apply escaping before inserting values such as the requirement title, summary, original wording, flow text, and response scripts.
    • Do not rely on prompt instructions alone; use a deterministic encoder.
  2. Separate data placeholders from trusted structural templates.

    • Do not generate __question_rows__, __score_rows__, __risk_rows__, or __layer_sections__ as arbitrary HTML strings.
    • Represent these sections as structured data and render them through a template engine with automatic escaping.
    • Alternatively, construct elements with document.createElement() and assign untrusted values through textContent.
  3. Sanitize any intentionally supported rich text.

    • If formatting must be retained, use a strict allowlist sanitizer.
    • Permit only necessary formatting elements and attributes.
    • Remove scripts, event-handler attributes, unsafe URL schemes, embedded frames, SVG, MathML, style injection, and active form controls.
  4. Protect special contexts.

    • Never place untrusted content directly into <title>.
    • Keep content intended for <pre> elements text-only.
    • Validate and constrain any value used in a class or attribute context.
  5. Add defense-in-depth browser controls.

    • Add a restrictive Content Security Policy that disallows inline scripts and event handlers, for example through an appropriate Content-Security-Policy response header when hosted.
    • Avoid exposing privileged host bridges to generated reports.
    • Consider opening standalone reports in an isolated or sandboxed origin.
  6. Document the safe rendering contract in SKILL.md.

    • Explicitly require contextual escaping for all user-provided and model-generated content.
    • State that “verbatim reproduction” refers to displayed text, not interpretation as HTML markup.
  7. **Add securi ...[truncated 343 chars]

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description defines invocation primarily through Chinese phrases and a Chinese business context, which can create a locale/language restriction. Although there is a bilingual title blurb later, the activation guidance does not explicitly state that users may invoke the skill in other languages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation examples under '可直接触发的说法' are exclusively Chinese and say these inputs '都应触发本技能', but do not indicate that equivalent phrasing in other languages is also supported. This can be read as a language-specific activation policy without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The HTML document declares lang="zh-CN" and all visible UI text is in Simplified Chinese, which imposes a specific language/locale on users. There is no visible opt-in, language selector, or documentation indicating that the skill is intentionally limited to a China-specific audience.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description defines a very broad activation surface across vague asks, oral tasks, screenshots, and one-line notes without strong trigger boundaries or exclusion criteria. This can cause the skill to activate in contexts where the user did not clearly request requirement-unpacking behavior, increasing the risk of inappropriate takeover, overcollection of context, or mis-scoped guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTML root sets lang="zh-CN", which explicitly fixes the document locale to Simplified Chinese. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless it is clearly justified as region-specific, which is not indicated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template contains extensive fixed Chinese UI text such as headings, labels, and disclaimers (接招包, 当前判断, 待确认问题, 风险红旗). This makes the generated report Chinese-specific by default and does not show any mechanism for language selection or justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill reference is written in Chinese and provides no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction 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
89% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, and nowhere indicates that the skill is intended only for Chinese-speaking users or offers an alternative language. That can violate language/locale policy because it effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all templates, headings, and examples exclusively in Chinese, which can impose a language requirement on users without explicit opt-in. The policy requires either offering a language/locale choice or clearly documenting and justifying the locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest prominently frames the skill in Chinese and includes Chinese-only trigger examples without stating that language should follow the user's preference. This can bias invocation and response behavior toward Chinese-language interaction even when the user has not opted in, creating usability, consent, and context-mismatch issues rather than a direct security compromise.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.