Back to skill

Security audit

目的地必备应用APP入口:出国一键直达

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent travel-app webpage generator, but it builds active HTML from unescaped user or generated text, which could make a crafted page run unwanted script or show phishing links.

Review before installing. Use it only when you want a Chinese-language local HTML travel checklist, avoid untrusted or adversarial destination/app text, and inspect generated download links before opening or sharing the page. The package does not show hidden persistence or credential access, but the HTML template should be fixed to escape text and validate URLs.

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
template.html:178
Finding

Unescaped Template Data Enables HTML and JavaScript Injection

Content
View full analysis
{{DESTINATION_EMOJI}} {{DESTINATION_NAME}} 旅行 App 工具包 ``` ```html
{{DESTINATION_EMOJI}}

{{DESTINATION_NAME}} 旅行 App 工具包

{{TRAVEL_STYLE}} · 共 款精选 App

``` ```html
{{FOOTER_TIPS}}
``` ```javascript const APPS = {{APPS_JSON}}; ``` ```javascript grid.innerHTML = list.map(app => { const p = PRI[app.priority] || PRI.optional; const url = platform === "ios" ? app.iosUrl : app.androidUrl; const ok = url != null; const label = platform === "ios" ? "🍎 App Store 下载" : "🤖 Play 商店下载"; const na = platform === "ios" ? "iOS 暂不可用" : "Android 暂不可用"; return '
' + '
' + app.icon + '
' + '
' + app.name + '
' + '' + p.label + '' + '
' + '

' + app.description + '

' + (app.tips ? '
💡 ' + app.tips + '
' : '') + (ok ? '' + label + '' : '
' + na + '
') + '
'; }).join(""); ``` ### Technical Analysis The template inserts destination data, footer content, and the application array into HTML and JavaScript contexts without context-sensitive escaping. The `APPS_JSON` placeholder is placed directly inside a `script` element. JSON serialization alone does not make this safe because a string containing `` can terminate the surrounding script e ...[truncated 3045 chars]
Remediation
View remediation
` from terminating the element. - Prefer placing serialized data in a non-executable element and parsing it explicitly, while still escaping HTML-significant characters. 2. **Replace `innerHTML` with DOM construction** - Create cards with `document.createElement`. - Assign application names, descriptions, tips, icons, and labels through `textContent`. - Set fixed CSS classes with `classList` rather than concatenating markup. 3. **Treat template fields as text** - Insert destination name, emoji, and travel style through `textContent`. - Do not permit arbitrary HTML in `FOOTER_TIPS`. - If formatted footer content is required, sanitize it with a strict allowlist that excludes scripts, event-handler attributes, embedded frames, forms, and dangerous URLs. 4. **Validate download URLs** - Parse each link with `new URL(value)`. - Require the `https:` protocol. - Allowlist only expected hosts such as `apps.apple.com` and `play.google.com`. - Reject credentials, unexpected ports, malformed URLs, and all other protocols or hosts. 5. **Constrain generated supplemental data** - Validate every generated application record against a strict schema. - Enforce length limits and enumerated values for categories and priorities. - Apply the same URL restrictions to Agent-supplemented records as to bundled records. 6. **Add defense in depth** - Use a restrictive Content Security Policy. - Move the inline script into a fixed local script file or authorize it with a generated nonce or hash. - Disallow object embedding and restrict navigation and network destinations where compatible with the page's function. - Add automated tests containing payloads such as closing script tags, quotation mark ...[truncated 116 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · template.html (reported line 1)May include surrounding context.

html
<!--
  Travel App Toolkit - HTML 模板

  使用方法:Agent 读取此模板,根据用户目的地替换模板变量,生成最终的 .html 文件。

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · template.html (reported line 1)May include surrounding context.

html
<!--
  Travel App Toolkit - HTML 模板

  使用方法:Agent 读取此模板,根据用户目的地替换模板变量,生成最终的 .html 文件。

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description says to use the skill when users mention phrases like "下载什么App", "travel apps", and "必备应用", which are broad and could occur in general travel discussion rather than a clear request for this specific skill. The trigger list also lacks negative examples or explicit constraints to narrow when the skill should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest description and the full instructions are written to operate in Chinese, including Chinese trigger phrases and Chinese output conventions, but there is no indication that the user can choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to write an HTML file into the user’s working directory and share a link without explicit confirmation, which creates a file-system side effect and exposes generated local content automatically. Because the output is active HTML/JS, this also increases risk if untrusted destination/app data is inserted into the page without sanitization, potentially leading to unsafe local content generation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON uses Chinese labels, descriptions, and tips throughout, which effectively fixes the skill content to a specific language/locale. The policy allows locale constraints only when they are justified or when users are given a language choice, neither of which is present in this file.

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 hard-codes lang="zh-CN" and presents the page title and user-facing content in Simplified Chinese. This is a natural-language/locale constraint that does not offer a user opt-in or alternative language selection, which can violate organizational language-choice policy.

Content

No source excerpt is available for this finding.