Back to skill

Security audit

Family Financial Planner

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent China-focused family finance dashboard, but it needs review because sensitive financial inputs are placed into executable HTML without defined escaping and the supposedly local report loads Google Fonts.

Install only if you are comfortable entering sensitive household financial information and generating a local HTML report that may contain that information. Use it for China-specific planning unless you explicitly adapt the assumptions, remove the Google Fonts import for fully local use, and ensure any user-provided text is escaped or serialized safely before opening or sharing the generated dashboard.

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

T09 · Insecure Skill Coding Practices

Error
Location
assets/dashboard-template.html:299
Finding

Unescaped User Data Can Be Injected into Executable HTML and JavaScript Contexts

Content
View full analysis

家庭财务全景分析

__SCENARIO_DESCRIPTION__

__DATE_TAG__
``` ```javascript function renderTab0() { document.getElementById('tab0').innerHTML = `
基准数据:__BASE_DATA_DESCRIPTION__
``` The model specification also places user-derived strings directly inside JavaScript string literals: ```javascript const stockAccounts = [ { name: '__NAME__', valueInOrigCurrency: __VALUE__, currency: 'HKD' }, // ... multiple accounts are allowed ]; const futureEquity = [ { date: '__DATE__', shares: __N__, pricePerShare: __PRICE__, currency: 'HKD', label: '__LABEL__' }, ]; ``` ### Technical Analysis The Skill instructs the Agent to replace placeholders with actual user data, but it does not define contextual escaping, serialization, or validation requirements. Several placeholders are inserted directly into HTML, template literals assigned to `innerHTML`, or quoted JavaScript values. These contexts require different defenses: - HTML text requires HTML entity encoding. - JavaScript strings require safe serialization rather than quote replacement. - Template literals must account for backticks and `${...}` interpolation. - Values assigned through `innerHTML` must not contain attacker-controlled markup. For example, a crafted scenario description such as: ```html

``` would become active markup if substituted verbatim into `__SCENARIO_DESCRIPTION__`. A crafted account name containing a quote or template-literal delimiter could also terminate its intended ...[truncated 1451 chars]

Remediation
View remediation
``` 9. Replace inline `onclick` handlers with `addEventListener` so that a stricter CSP can be enforced. 10. Add automated tests containing quotes, backticks, `${...}`, closing tags, and event-handler payloads to verify that all supplied strings are rendered only as text. ]]>

other

Note
Location
assets/dashboard-template.html:7
Finding

External Google Fonts Request Violates the Offline Design and Exposes Connection Metadata

Content
View full analysis
``` The Skill's design requirements state that the dashboard should be self-contained: ```text Single-file delivery: all CSS/JS is inline in one HTML file, with zero dependencies, and can be opened directly in a browser. ``` ### Technical Analysis The generated dashboard is described as a zero-dependency, offline-capable document, but it imports a stylesheet from `fonts.googleapis.com`. When the file is opened while the browser has network access, the browser contacts Google Fonts and may subsequently retrieve font files from associated Google domains. This external connection discloses ordinary network metadata, including the user's IP address, connection timing, browser request headers, and requested font resource. It also means the dashboard is not fully self-contained and its appearance depends on third-party availability. No evidence was found that this request intentionally transmits the dashboard's financial contents. The confirmed issue is the undisclosed connection and associated metadata exposure. ### Attack Path 1. The Agent generates a dashboard using the supplied template. 2. The user opens the dashboard in a browser with network access. 3. The browser requests the Google Fonts stylesheet. 4. Google receives the request and related connection metadata. 5. Additional requests may be made for referenced font resources. ### Impact Assessment The impact is limited to privacy and availability: - A third party can observe the user's IP address and request timing. - Opening the supposedly offline report produces an external network connection. - Fonts may fail to ...[truncated 292 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

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 · assets/dashboard-template.html (reported line 267)May include surrounding context.

html
</head>
<body>

<!--
  ========================================
  TEMPLATE USAGE INSTRUCTIONS
  ========================================

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 · assets/dashboard-template.html (reported line 305)May include surrounding context.

html
<div class="container">

  <!-- Tab Navigation — adjust based on included tabs -->
  <div class="tab-nav">
    <button class="tab-btn active" onclick="switchTab(0)">资产总览</button>
    <!-- Add/remove tab buttons as needed -->

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 · assets/dashboard-template.html (reported line 455)May include surrounding context.

html
<div class="dashboard">
      <!-- Stat cards: 总资产、总负债、净资产、资产负债率、流动资产、月度贷款 -->
      <!-- Implement based on user's actual data -->
    </div>

    <div class="card">

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 · assets/dashboard-template.html (reported line 480)May include surrounding context.

html
</div>
      <div class="card" style="border-top:4px solid var(--danger);">
        <h2 style="color:var(--danger);">离职后月度收支</h2>
        <!-- Income (passive only) + Full expense table + Monthly deficit -->
      </div>
    </div>
    <div class="card">

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 · assets/dashboard-template.html (reported line 494)May include surrounding context.

html
function renderTab5() {
  document.getElementById('tab5').innerHTML = `
    <!-- big-comparison: Scenario A vs Scenario B -->
    <!-- Detailed comparison table -->
    <!-- Asset layer analysis -->
    <!-- Income scenario analysis -->
  `;

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 · assets/dashboard-template.html (reported line 519)May include surrounding context.

html
盲区修正 · 通胀 / 备用金 / 投资回报
      </h2>
    </div>
    <!-- Before/after comparison table -->
    <!-- Inflation erosion table -->
    <!-- Dynamic survival simulation -->
  `;

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the agent to collect a detailed household financial profile, including income, assets, debts, family structure, children, and borrowing from friends or relatives, but provides no user-facing minimization, consent, retention, or privacy guidance. This creates unnecessary exposure of highly sensitive personal and financial data and increases the risk of oversharing, unsafe downstream use, or accidental disclosure in generated outputs such as the HTML dashboard.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill hard-codes China-specific tax, social insurance, housing fund, and stock-market conventions as design principles without requiring confirmation that the user is in China or wants PRC-specific assumptions. In a financial-planning context, this can produce materially misleading calculations or advice for users in other jurisdictions, especially if regional assumptions are silently applied.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document sets lang="zh-CN", and the template content is written entirely for a Chinese locale. Under the policy rule, forcing a specific language or locale without offering a choice or documenting a justified region-specific constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage guidance instructs the agent to ask the user a Chinese-language question and continue processing based on that interaction, while the entire document is written as if Chinese is the required operating language. There is no indication that the user can choose another language or that the locale restriction is optional or justified as a region-specific compliance requirement.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template loads Google Fonts from an external domain, which causes client browsers to contact a third party when viewing a supposedly local financial dashboard. For a tool handling highly sensitive family financial data, this introduces unnecessary privacy leakage, metadata exposure, and dependence on external network access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The helper functions explicitly format numbers using the 'zh-CN' locale and currency-style labels, which imposes a specific language/locale behavior. The policy allows locale constraints when users are given a choice or when the constraint is clearly documented as region-specific; here the formatting is forced in code examples without any opt-in mechanism.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.