Back to skill

Security audit

travel-planner

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent travel planner, but its generated HTML can load remote scripts and render generated travel data unsafely, so it needs review before use.

Install only if you are comfortable reviewing generated HTML reports before opening or sharing them. Prefer bundled or integrity-checked assets, validate generated DATA against a schema, allow only safe https booking links, and avoid granting the skill access to logged-in travel or social accounts unless you explicitly intend that.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
assets/template.html:686
Finding

Unvalidated URL Schemes in Generated Booking Links

Content
View full analysis
`${esc(l.name)}`).join(""); ``` The same pattern is used for hotel links: ```javascript const links = (h.links || []).map(l => `${esc(l.name)}`).join(""); ``` ### Technical Analysis The `esc()` function performs HTML metacharacter escaping: ```javascript const esc = (s) => (s == null ? "" : String(s)).replace(/[&<>"]/g, c => ({ "&":"&","<":"<",">":">",'"':""" }[c])); ``` However, HTML escaping does not validate the semantic safety of a URL. A value using an executable or otherwise dangerous scheme, such as `javascript:`, can remain valid after escaping. The template expects travel research results and generated itinerary data to populate `DATA.transport[].links` and `DATA.hotels[].links`. If an attacker-controlled or incorrectly generated URL reaches either field, it is inserted directly into an anchor's `href` attribute. `target="_blank"` and `rel="noopener"` mitigate opener-based attacks but do not prevent execution of a dangerous URL scheme. ### Attack Path 1. An attacker controls or poisons a travel search result, booking recommendation, or other source used to construct the itinerary. 2. The malicious source supplies a URL such as `javascript:alert(document.domain)`. 3. The Agent places that value in `DATA.transport.*[].links[].url` or `DATA.hotels[].links[].url`. 4. The renderer HTML-escapes the value but does not reject its scheme. 5. The generated anchor retains the dangerous URL in its `href`. 6. A user clicks the apparent booking link. 7. The browser may execute the payload in the context of the generated itinerary. ### Impact Assessment Succes ...[truncated 609 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/template.html:646
Finding

HTML Attribute Injection Through Unvalidated Structural DATA Fields

Content
View full analysis
`${it.label}` + `` + `${it.val}%`).join(""); $("cover").innerHTML = `

${esc(m.destination)} · ${m.days_count}日行程

` + `

${esc(m.date_start)} ~ ${esc(m.date_end)} | ${m.people}人 | 预算 ${fmtMoney(m.budget_total)}

` + `
${confHtml}
` + `
数据生成时间 ${esc(m.generated_at || "")}
`; ``` Day identifiers are inserted into attributes without escaping: ```javascript html += `
` + ``` ```javascript return ` ``` Class-name fragments are also generated from unvalidated values: ```javascript ``` ```javascript html += `

🌦️ 天气

${esc(r.weather.text || "")}

${tips ? `
    ${tips}
` : ""}
`; ``` These strings are subsequently assigned to `innerHTML`. ### Technical Analysis The renderer correctly applies `esc()` to many human-readable text fields, but several structural fields are interpolated into HTML attribute contexts without escaping or schema validation. Affected values include: - `DATA.meta.confidence.*` - `DATA.days[].day_index` - `DATA.transport.*[].level` - `DATA.risk.weather.level` - `DATA.risk.holiday.level` If one of these values contains quotes and markup, it can terminate the i ...[truncated 2083 chars]
Remediation
View remediation
maximum) { throw new TypeError("Invalid integer value"); } return number; } function safeLevel(value) { const allowed = new Set(["green", "yellow", "gray"]); return allowed.has(value) ? value : "gray"; } function safePercentage(value) { const number = Number(value); if (!Number.isFinite(number)) return 0; return Math.min(100, Math.max(0, number)); } ``` Example DOM construction: ```javascript const dayIndex = safeInteger(day.day_index, 1, 365); const article = document.createElement("article"); article.className = "day-card"; article.dataset.day = String(dayIndex); ``` Confidence-bar widths should be assigned as DOM style properties only after numeric validation: ```javascript bar.style.width = `${safePercentage(value)}%`; ``` ]]>

T08 · Insecure Dependencies

Warning
Location
assets/template.html:11
Finding

Chart.js Loaded from a Third-Party CDN Without Subresource Integrity

Content
View full analysis
``` For comparison, the Leaflet resources immediately above it use integrity metadata: ```html ``` ### Technical Analysis The generated itinerary executes Chart.js directly from jsDelivr. The package version is fixed, which reduces accidental version drift, but the script does not have a Subresource Integrity hash. Without integrity verification, the browser trusts any response returned for that CDN URL. If the CDN, package distribution path, DNS resolution, certificate infrastructure, or upstream package artifact is compromised, modified JavaScript can execute automatically when the itinerary is opened with network access. This is especially relevant because the generated report is presented as a standalone HTML file that users may open locally. Remote scripts loaded by a local report still execute with the document's browser privileges. ### Attack Path 1. An attacker compromises the CDN response path, upstream package artifact, or another component capable of changing the JavaScript returned by the referenced URL. 2. A user opens a generated itinerary while connected to the network. 3. The browser downloads the modified Chart.js resource. 4. No integrity hash is present to detect that its contents differ from the reviewed version. 5. The browser executes the modified script before the template's rendering logic. 6. The ma ...[truncated 761 chars]
Remediation
View remediation
``` The placeholder must not be deployed. It must be replaced with a digest independently calculated from the exact reviewed artifact. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
8. report-render → 输出HTML行程书(使用 assets/template.html 模板)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
8. report-render → 输出HTML行程书(使用 assets/template.html 模板)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

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

Content

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

html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill name and description are presented entirely in Chinese and define outputs such as 行程书 without stating that language is selectable or that the skill is intentionally limited to Chinese-speaking users. This can create an implicit locale policy constraint without user opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The listed triggers such as "生成XX攻略", "性价比高的路线", and "好吃好玩的推荐" are generic phrases a user might say in ordinary conversation, making it unclear when this specific skill should activate versus a general assistant response. The file does not provide constraints, negative examples, or invocation boundaries to narrow activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The '表达风格' section prescribes a Chinese-specific response style and wording constraints, such as avoiding certain Chinese phrases, without indicating that users may choose another language. This creates a natural-language policy concern because it imposes a locale/language preference by default rather than offering opt-in or alternatives.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document declares lang="zh-CN", which forces a specific language/locale in a file type covered by natural-language policy checks. The template also consistently uses Chinese UI text throughout, and there is no indication that users can opt into another language or that the locale restriction is required for a region-specific tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill content is entirely written to enforce Chinese-only behavior and provides no mechanism to respect or detect the user's preferred language. This can cause accessibility and usability failures, and in multilingual contexts may lead users to misunderstand pricing, navigation, or booking details in a travel-planning workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file instructs the skill to render an HTML report and save it as a file under workspace/output/ or a user-specified directory. Because markdown files should warn about behaviors that affect user data or system state, the omission of an explicit user-facing warning about automatic file creation is a minor disclosure gap.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly says the agent will generate an HTML itinerary file and later notes reliance on external CDNs and map tile providers, but it does not warn users that opening the file may trigger third-party network requests. This is a real transparency and privacy issue: itinerary contents can include sensitive travel details, and users may not expect generated local files to load remote resources or disclose metadata such as IP address and timing to external services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown describes generating a complete HTML itinerary and saving it to workspace/output/ or a user-specified directory, which affects the user's filesystem. There is no explicit warning or user-facing disclosure about creating files or choosing a save location before output is written.

Content

No source excerpt is available for this finding.