Back to skill

Security audit

生活满意度与平衡优化

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent life-balance tool, but it handles sensitive personal reflections with unsafe report rendering, automatic browser storage, and an unprotected third-party script.

Review carefully before installing, especially on shared or managed devices. Prefer a version that bundles Chart.js locally or uses SRI, safely escapes embedded JSON and rendered text, and makes history storage opt-in with clear delete and disable controls.

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

T09 · Insecure Skill Coding Practices

Error
Location
assets/report-template.html:404
Finding

Stored HTML and Script Injection in Generated Reports

Content
View full analysis
` 之前插入数据脚本标签:`` 4. 用当前日期替换模板中的 `{{REPORT_DATE}}` 和 `{{OVERALL_SCORE}}` 占位符 5. 将最终 HTML 写入工作目录,文件命名:`人生轮盘报告-YYYY-MM-DD.html` 6. 使用 `present_files` 展示报告 ``` Reflection values are interpolated into HTML and assigned through `innerHTML`: ```javascript const container = document.getElementById('reflections'); container.innerHTML = reflections.map((r, i) => `
Q${i+1}: ${questions[i] || ''}
${r}
`).join(''); ``` History values are also interpolated into HTML without output encoding: ```javascript const table = document.getElementById('historyTable'); const header = `时间${DIMENSIONS.map(d => `${d.short}`).join('')}均分`; const rows = [...history].reverse().map((h, idx, arr) => { const prev = arr[idx + 1]; const avg = (DIMENSIONS.reduce((s, d) => s + h[d.id], 0) / 8).toFixed(2); return ` ${h.date || ''} ${DIMENSIONS.map(d => { const cur = h[d.id]; if (!prev) return `${cur}`; const diff = cur - prev[d.id]; if (diff > 0) return `${cur} ↑${diff}`; if (diff < 0) return `${cur} ↓${Math.abs(diff)}`; return `${cur}`; }).join('')} ${avg} `; }).join(''); table.innerHTML = header + rows; ``` ### Technical Analysis The report renderer treats reflection and history data as trusted ma ...[truncated 2440 chars]
Remediation
View remediation
`, `&`, U+2028, and U+2029. - Prefer loading data from a separately generated JSON file where the runtime environment permits it. 4. If rich text is intentionally supported, sanitize it with a well-maintained allowlist-based HTML sanitizer. Do not implement sanitization with regular expressions. 5. Add a restrictive Content Security Policy. For a fully local report, disallow network access and inline script execution where practical. 6. Treat data read from `localStorage` as untrusted. Validate and safely render it each time it is loaded. 7. Add regression tests using payloads containing HTML elements, event handlers, quotes, and script-closing sequences to verify that they are displayed as text rather than interpreted as markup. ]]>

T08 · Insecure Dependencies

Warning
Location
assets/report-template.html:7
Finding

Remote JavaScript Dependency Loaded Without Subresource Integrity

Content
View full analysis
``` ### Technical Analysis Every generated report retrieves and executes Chart.js from a third-party CDN when the report is opened. Although a package version is specified, the script is not protected by a Subresource Integrity hash. The browser therefore has no cryptographic mechanism to verify that the returned script is the exact artifact reviewed by the Skill author. If the CDN, package publication account, distribution path, DNS resolution, or delivery infrastructure is compromised, the response can be replaced with attacker-controlled JavaScript. A remotely supplied script executes in the context of the report page and can interact with the report DOM and origin-accessible storage. The external request also conflicts with the Skill's broad privacy statement that data remains local and that no uploading or sharing occurs. The audited code does not explicitly send report contents to the CDN, but opening the report still creates an external request and discloses ordinary connection metadata. ### Attack Path 1. An attacker compromises or gains control over the CDN response, package artifact, publication account, or relevant delivery infrastructure. 2. The user opens a generated report while network access is available. 3. The browser requests the Chart.js resource from the third-party CDN. 4. Because no integrity hash is present, the browser accepts a modified response. 5. The attacker-controlled JavaScript executes as part of the report page. 6. The script can read or modify report content and origin-accessible browser storage and can transmit accessible information over the network. ### Impact Assessment A successful supply-chain attack can execute arbitra ...[truncated 594 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (10)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README is written entirely in Chinese and presents the skill behavior and trigger vocabulary in Chinese without any user opt-in or documented locale restriction. In a mixed-language environment, this can create user-confusion, reduce transparency about what the skill does, and cause unexpected language switching or mismatched behavior when activated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases are very broad and include common everyday terms such as life audit, self-improvement, burnout, and habit adjustment. In an agent skill system, this can cause unintentional invocation over unrelated user requests, allowing the skill to intercept conversations and influence outputs beyond the user's clear intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises many generic trigger phrases such as '自我提升', '生活满意度', 'life audit', and 'burnout check', which are broad enough to match ordinary conversation outside the user's intent to invoke this skill. This can cause unintended activation in sensitive wellness contexts, leading the agent to collect personal mental-health, financial, and relationship data or generate persistent reports when the user did not explicitly ask for that workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation logic says the skill should start whenever the user mentions being tired, burned out, wanting habit changes, or quarterly reflection, which are common phrases in normal conversation. In this skill's context, accidental activation is more concerning because the workflow immediately pivots into structured self-assessment across health, emotions, finances, and relationships, increasing the chance of over-collection of sensitive data without clear consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill stores sensitive self-assessment history in browser localStorage, including mental state, burnout indicators, financial status, relationships, and historical trends, but does not provide a prominent upfront warning or obtain informed consent before persistence. Even though storage is local, persistent sensitive data on a shared or compromised device can be exposed to other users or scripts, and users may not expect wellness data to remain on disk across sessions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template pulls Chart.js from a third-party CDN at runtime, which introduces a supply-chain and privacy risk for a report handling sensitive self-assessment data. If the CDN, network path, or dependency version is compromised, arbitrary script can execute in the report context and access all entered data and localStorage contents.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code persistently stores life-balance scores and free-text notes in localStorage, which can contain sensitive mental health, relationship, financial, and burnout information. localStorage is long-lived, readable by any script running on the same origin, and creates unintended retention of highly personal data without clear disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

This page stores sensitive self-assessment history in localStorage without any user-facing warning or consent, increasing the risk that users unknowingly leave intimate personal reflections on a shared or managed device. In this skill's context, the notes can reveal burnout indicators, emotional state, finances, and relationships, making undisclosed persistence more privacy-impacting than ordinary app preferences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document declares lang="zh-CN" and all visible interface text is written in Simplified Chinese, which effectively fixes the skill output to a specific language/locale. The file does not offer a language choice or explain that the skill is intentionally limited to a Chinese-language audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file is entirely written in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the language/locale policy rule, a skill that implicitly enforces a specific language without opt-in can be considered a natural-language policy violation.

Content

No source excerpt is available for this finding.