Back to skill

Security audit

help-you-choose(帮你选)

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent decision-coaching skill, but it can expose sensitive personal decision details through public report hosting and unsafe generated HTML.

Install only if you are comfortable with a Chinese-first decision coach that may store sensitive decision history and profile information locally after consent. Do not publish generated reports to public hosting unless you have reviewed and redacted the content and explicitly want it shared; treat generated HTML as unsafe if any labels or titles came from untrusted text.

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
scripts/visualize_decision.py:112
Finding

Persistent Script Injection in Generated Decision Reports

Content
View full analysis
'
'+name+'
' ).join(''); } ``` ```javascript angles.forEach((a, i) => { const x = cx + R * Math.cos(a), y = cy + R * Math.sin(a); html += ''; const lx = cx + (R + 24) * Math.cos(a), ly = cy + (R + 24) * Math.sin(a); html += ''+DATA.dimensions[i]+''; }); svg.innerHTML = html; ``` ```javascript function renderSliders() { document.getElementById('sliders').innerHTML = DATA.dimensions.map((dim, i) => '
'+dim+'
'+weights[i]+'%
' ).join(''); } ``` ```javascript function renderMatrix ...[truncated 3321 chars]
Remediation
View remediation
` block or another inert container. Before embedding serialized JSON into HTML, escape `<`, `>`, `&`, and Unicode line separators, including conversion of `<` to `\u003c`. 4. Escape the visible title with `html.escape(args.title, quote=True)` before placing it in an HTML text context. 5. Validate the input schema: - Require dimensions and weights to be arrays. - Require all labels to be strings with reasonable length limits. - Require weights and scores to be finite numeric values within documented ranges. - Require at least one dimension and one option. 6. Add a restrictive Content Security Policy that disallows inline and remote scripts. Move the page JavaScript into a separately generated static file or authorize it with a per-document nonce. 7. Add regression tests using labels containing closing script tags, HTML event handlers, SVG payloads, quotation marks, ampersands, and Unicode separator characters. 8. Treat existing generated reports as potentially unsafe and regenerate them after the encoding and DOM construction fixes are deployed. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:280
Finding

Sensitive Decision Reports May Be Published Without Explicit Publication Consent

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

描述将技能定位为一个面向人生抉择的综合决策助手,核心能力应包括交互式引导、提问、分析框架应用,以及历史和画像功能。实际代码只实现了“交互式可视化分析”中的一小部分:把已提供的维度、权重和选项分数渲染成 HTML 报告,并允许前端滑块调整权重后重算结果。代码没有任何自然语言交互、问题引导、框架选择、偏好学习、数据持久化或历史存储逻辑。因此,虽然与“可视化分析”这一子功能相符,但与整体声明的主要用途相比明显不完整,属于描述与实际行为不一致。

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad everyday expressions like '帮我决定' and '纠结', which can cause the skill to activate in many unrelated contexts. Overbroad activation increases the chance that sensitive conversations are routed into persistence, profiling, or visualization flows without the user intentionally invoking this specialized skill.

Content

No source excerpt is available for this finding.

Unvalidated Output Injection

High
Category
Output Handling
Confidence
96% confidence
Finding

The script builds HTML with string concatenation and assigns it to innerHTML using untrusted option names and dimension labels derived from CLI JSON input. An attacker can inject HTML/JavaScript into fields like option names, title, or dimensions, producing a generated report that executes script when opened, resulting in stored/self-XSS in the output HTML.

Content

Scanner excerpt · scripts/visualize_decision.py (reported line 183)May include surrounding context.

python
function renderResults() {
  const results = calcScores();
  document.getElementById('result-bars').innerHTML = results.map((r, i) =>
    '<div class="result-bar-container"><div class="result-label"><span class="result-name">'+r.name+'</span><span class="result-score">'+r.score.toFixed(2)+'</span></div><div class="bar-bg"><div class="bar-fill colors-'+i%5+'" style="width:'+(r.score/10*100).toFixed(1)+'%"></div></div></div>'
  ).join('');
}

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill instructs the agent to read reference files and write persistent data under ~/.decision-advisor/data/, but it declares no explicit tool scope or permissions. This creates an undeclared capability gap: a host may grant broader file access than users expect, increasing the chance of unauthorized local reads/writes or unsafe execution of helper scripts.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
72% confidence
Finding

The skill includes explicit session persistence via saving decision history and profile data across sessions, which creates retention risk for sensitive personal content. In a life-decision context, persisted records may include intimate relationship, career, and psychological information, making the data more sensitive than ordinary chat state.

Content

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

md
### Language
- Primary interaction language: Chinese (简体中文)
- Adapt to the user's language preference if they write in English or other languages.

## Anti-patterns to Avoid

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions permit deploying generated decision-analysis HTML to a public URL for remote users. Decision reports can contain highly sensitive personal information about careers, relationships, finances, values, and inferred preferences, so public hosting materially increases the risk of accidental disclosure, link leakage, indexing, or unauthorized access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill recommends public deployment of generated HTML but does not require a user-facing warning that the page may expose personal decision details outside the chat environment. Without a clear warning at the moment of action, users may unknowingly publish sensitive data to third-party infrastructure or broadly accessible URLs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill expands from one-off decision advice into persistent user profiling, including cognitive biases, preferences, patterns, and past lessons across sessions. Even with consent language, this collects sensitive psychological and behavioral data that may exceed user expectations for a conversational coaching tool and raises privacy, retention, and secondary-use risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all guidance exclusively in Chinese, and there is no indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-speaking context. Under the policy rules, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persists highly sensitive user-supplied decision data, including personal context, reasoning, choices, reflections, and satisfaction, to a predictable file under the user's home directory without any notice, consent flow, or privacy controls. In the context of a life-decision assistant, this materially increases privacy risk because users may disclose intimate relationship, career, health, or value-related information that can later be exposed to other local users, backups, malware, or support tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Profile data is written silently to disk without any warning that sensitive decision-history data will persist in ~/.decision-advisor/data/user_profile.json. Because the stored content includes personal preferences, cognitive biases, and past decisions, users may reveal intimate information they would not share if they knew it was being retained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The summary command presents all user-facing output in Chinese, while the rest of the CLI metadata and help are in English. This imposes a specific language on users without opt-in or explanation, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code embeds a fixed Chinese locale (lang="zh-CN") and Chinese-only interface text in the generated output. Under the natural-language policy rules, forcing a specific language without user opt-in is a policy concern unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script intentionally creates a long-lived profile file under the user's home directory and stores biases, preferences, behavioral patterns, and past lessons across sessions. In this skill context, that persistence expands data collection beyond a transient decision-support interaction and can expose sensitive personal history if the device or account is shared or later compromised.

Content

No source excerpt is available for this finding.