Back to skill

Security audit

节假日出行决策skill

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent holiday travel-planning purpose, but its report widget has avoidable security risks from remote JavaScript and unescaped HTML rendering.

Install only if you are comfortable with the widget loading third-party JavaScript and rendering generated report fields as HTML. A safer version should bundle the chart library locally, add integrity/CSP controls if remote assets remain, and render report data with textContent or equivalent escaping.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
assets/report_widget.html:169
Finding

DOM-Based HTML Injection Through Unescaped Widget Data

Content
View full analysis
' + e.dimension + '' + '
' + e.value + '
' + '
' + e.desc + '
'; ``` ```javascript card.innerHTML = '
' + '' + w.label + '' + '' + (w.tag || '') + '' + '
' + '
' + (w.leave ? '
请假:' + w.leave + '
' : '') + '
出发:' + w.depart + '
' + '
返程:' + w.return_date + '
' + '
行程:' + w.duration + '
' + '
优势:' + w.advantage + '
' + '
'; ``` ```javascript const tags = (d.tags || []).map(t => '' + t + '').join(''); const tagCls = d.primary ? 'tag-primary' : 'tag-secondary'; const descCls = d.primary ? 'dest-desc dest-primary' : 'dest-desc'; const reasons = (d.reasons || []).map(r => '
  • ' + r + '
  • ').join(''); card.innerHTML = '
    ' + '' + d.name + '' + '' + (d.label || '') + '' + '
    ' + '
    ' + tags + '
    ' + '
      ' + reasons + '
    '; ``` ```javascript tr.innerHTML = '' + b.item + '' + '' + b.range + '' + '' + b.note + ''; ``` ```javascript li.innerHTML = '' + a.timing + '' + a.action; ``` ### Technical Analysis The widget reads report content from `window.__WIDGET_DATA__` and concatenates numerous fields directly in ...[truncated 2270 chars]
    Remediation
    View remediation

    T03 · Remote Payload Retrieval and Execution

    Warning
    Location
    assets/report_widget.html:151
    Finding

    Remote JavaScript Execution Without Integrity Verification

    Content
    View full analysis
    ``` ### Technical Analysis The report widget downloads and executes JavaScript from a third-party CDN every time the widget is rendered. Although the URL identifies Chart.js version `4.4.0`, the script element does not include a Subresource Integrity hash. The widget therefore trusts whatever bytes the remote endpoint returns at runtime. This creates a remote payload execution and supply-chain boundary: the effective executable content can differ from the artifact that was audited. Compromise of the CDN, upstream package distribution, account infrastructure, or relevant network delivery path could cause substituted JavaScript to execute in the widget page. The dependency also creates a runtime network requirement that is not necessary if the reviewed Chart.js build is bundled locally. ### Attack Path 1. The report widget is opened. 2. The browser requests `chart.umd.min.js` from `cdn.jsdelivr.net`. 3. The CDN or an upstream delivery component returns compromised or substituted JavaScript. 4. Because no integrity hash is supplied, the browser accepts the response. 5. The response executes with the JavaScript privileges available to the widget page. 6. The malicious dependency can inspect or modify the report DOM and use any origin-level capabilities exposed to the widget. ### Impact Assessment A compromised remote script could: - Read and alter all report information available in the widget DOM. - Replace recommendations or display phishing content. - Initiate arbitrary network requests permitted by the widget's security policy. - Access browser storage or APIs available to the widget origin. - Exploit any additional privileges exposed by the widget host. Th ...[truncated 286 chars]
    Remediation
    View remediation
    ``` The hash must be generated from and compared against the exact approved file; a placeholder must never be deployed. 3. Enforce a restrictive Content Security Policy that permits scripts only from explicitly approved sources and disallows inline execution. 4. Pin and periodically review the exact dependency version and its transitive supply chain. 5. Document the runtime network dependency and define behavior for unavailable or rejected CDN responses. 6. Consider implementing the chart without third-party runtime code or rendering a non-script fallback when the chart library cannot be securely loaded. ]]>
    Vulnerability Patterns
    • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
    • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
    • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
    Findings (9)

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The manifest description and core instructions present the skill in Chinese only, and all invocation examples are Chinese-language inputs. This effectively enforces a specific language/locale behavior without stating that users may choose another language, which matches the language/locale policy concern.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    92% confidence
    Finding

    The manifest-like JSON sets "default_language" to "zh-CN", which is a natural-language locale constraint. There is no accompanying indication in this file that users can choose another language or opt in to this locale, so it may violate language/locale policy requirements.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    This HTML widget contains multiple user-facing labels and headings in Chinese only, such as the badge, title, and section names. That can violate language/locale policy when the skill forces a specific language without user opt-in or documented regional scoping.

    Content

    No source excerpt is available for this finding.

    Description-Behavior Mismatch

    Medium
    Category
    Not specified by scanner
    Confidence
    97% confidence
    Finding

    The widget imports Chart.js from a third-party CDN at runtime, which gives externally hosted code execution privileges inside the widget. If the CDN, dependency, or network path is compromised, arbitrary script could run in the user's context; for a static travel-report renderer, this capability is not necessary to fulfill the skill's purpose.

    Content

    No source excerpt is available for this finding.

    Context-Inappropriate Capability

    Medium
    Category
    Not specified by scanner
    Confidence
    98% confidence
    Finding

    This file executes remote JavaScript from jsDelivr, effectively extending the widget's trust boundary to a third party. Because the skill only needs to display a holiday planning report, remote code execution via CDN is excessive and increases supply-chain and tampering risk without clear business necessity.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The file hardcodes Chinese-only output style and tone requirements without indicating that the assistant should adapt to the user's language or obtain language preference first. This can cause inappropriate language switching, degrade accessibility, and create prompt-steering behavior that overrides user intent, though it does not directly enable code execution or data exfiltration.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    This markdown file is entirely framed as a Chinese example report and provides no indication that users may choose another language or locale. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    96% confidence
    Finding

    The file title and instructions require the report to be produced in Chinese, including a fixed Chinese report title, but there is no indication that the user can choose another language. This is a natural-language locale policy issue because it imposes a specific language by default without opt-in or clear regional justification.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    The title and all field descriptions are written in Chinese, and the examples prescribe Chinese text values for report content. This creates a natural-language locale constraint without any indication that users may choose another language or that the skill is region-specific by design.

    Content

    No source excerpt is available for this finding.