Back to skill

Security audit

目的地国家/地区旅行安全与禁忌提示

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward travel safety HTML-page generator, but its generated page should be treated carefully because user-supplied text is inserted into HTML without explicit escaping.

Install only if you want a Chinese-language travel safety briefing generator that creates local HTML files. Do not use untrusted destination names or pasted content containing HTML, and review generated files before sharing or opening them in sensitive browser contexts; the maintainer should add HTML escaping and a restrictive CSP.

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
SKILL.md:90
Finding

Unescaped Placeholder Substitution Enables HTML Injection and Script Execution

Content
View full analysis
content`; otherwise output empty string. 4. **Output** — Save completed HTML as `.html` file and provide the link. ``` Representative affected sinks in `template.html` include: ```html 旅行安全与禁忌 · {place} ``` ```html

旅行安全与禁忌 · {place}

面向普通观光游客 · 时间:{time_of_day} · 出行:{travel_party}

偏好:{pref}
模式:合规安全
{safety_tip}
``` Additional placeholders are inserted directly into list items, table cells, and `div` elements throughout `template.html:222-319`. The optional `{friendly_zone_4_optional}` value is explicitly constructed as raw HTML. ### Technical Analysis The required `place` variable originates from user input. Other values can contain user-influenced or externally researched text. The workflow requires direct placeholder replacement but does not require HTML entity encoding, contextual output escaping, sanitization, or validation. Consequently ...[truncated 2422 chars]
Remediation
View remediation
`, `"`, and `'`. - Do not rely on the language model to avoid producing markup. 2. **Separate text values from trusted markup** - Treat `friendly_zone_4` as plain text. - Escape its content first, then construct the surrounding `
  • ` element in trusted template logic. - Do not allow `{friendly_zone_4_optional}` or any other content variable to carry unrestricted HTML. 3. **Use an auto-escaping template engine** - Render the document through a template system that escapes variables by default. - Permit raw HTML only for fixed, developer-controlled fragments. - Add tests covering closing tags, event-handler attributes, encoded payloads, and malformed markup. 4. **Validate structured fields** - Apply allowlists and length limits to telephone numbers, application names, and destination metadata. - Reject control characters and unexpected markup in fields intended to contain plain text. 5. **Add browser-level defense in depth** - Add a restrictive Content Security Policy, preferably delivered as an HTTP header when the file is hosted. - If only a single HTML file is possible, add an appropriate CSP `meta` element. - Disallow inline scripts and event handlers, and restrict outbound connections to approved destinations. 6. **Update the workflow documentation** - Replace the raw-substitution requirement with explicit instructions that every externally influenced value must be contextually escaped before rendering. - Document that generated or researched content is untrusted even when it was not entered directly by the user. ]]>
  • Vulnerability Patterns
    • 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
    • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
    • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
    Findings (3)

    Vague Triggers

    Medium
    Category
    Not specified by scanner
    Confidence
    94% confidence
    Finding

    The skill advertises broad trigger phrases like general travel safety, etiquette, laws, and destination tips without tight activation boundaries, which can cause the agent to invoke it for loosely related travel queries. Over-broad routing can lead to unnecessary file generation, external research behavior, or disclosure of safety/legal guidance when the user did not explicitly request a generated HTML artifact.

    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 explicitly sets the page language to zh-CN, and the visible interface text throughout the template is written only in Simplified Chinese. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the constraint is clearly justified, which is not present here.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    89% confidence
    Finding

    The workflow instructs the agent to save a completed HTML file and provide a link, but it does not require informing the user beforehand that a file will be created. Silent file creation is a safety and transparency issue because it can surprise users, create unwanted artifacts, and normalize agent side effects without consent.

    Content

    No source excerpt is available for this finding.

    Static analysis

    No suspicious patterns detected.