Back to skill

Security audit

Conversation Miner

Security checks for vulnerabilities and agentic risk

Overview

The skill’s conversation-mining purpose is coherent, but it combines broad chat-history access and persistent storage with unsafe local file-write paths that users should review before installing.

Install only if you are comfortable with the skill reading recent conversation history and potentially saving summaries, feedback, preferences, and exports. Avoid using it on chats containing secrets or confidential data, and do not run the bundled CLI with untrusted --user, MINER_USER, MINER_DATA_DIR, or --output values until path validation and export containment are added.

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
src/storage.js:25
Finding

Path Traversal Through Unsanitized User Identifier

Content
View full analysis
arg.startsWith('--user=')); if (userArg) { return userArg.split('=')[1]; } return process.env.MINER_USER || 'default'; } ``` ```js // src/storage.js:25-26 function getDataFilePath(userId) { return path.join(DATA_DIR, `${userId || 'default'}.json`); } ``` ```js // src/storage.js:37-48 function loadUserData(userId) { initDataDir(); const filePath = getDataFilePath(userId); if (!fs.existsSync(filePath)) { return { sessions: [], tags: [] }; } try { const content = fs.readFileSync(filePath, 'utf-8'); return JSON.parse(content); ``` ```js // src/storage.js:58-69 function saveUserData(userId, data) { initDataDir(); const filePath = getDataFilePath(userId); try { fs.writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf-8'); } catch (error) { console.error('保存数据失败:', error.message); } } ``` ### Technical Analysis The CLI accepts a user identifier from `--user=` or the `MINER_USER` environment variable and returns it without validation. The storage module interpolates this value into a filename and passes it to `path.join`. `path.join` normalizes traversal components but does not guarantee that the resulting path remains under `DATA_DIR`. A value containing components such as `../../` can therefore resolve outside the intended conversation-data directory. The resulting path reaches both a filesystem read sink (`fs.readFileSync`) and a write sink (`fs.writeFileSync`). Reads are directly reachable through CLI commands that load user data. The write sink is exposed through the storage module API and can be reached by a ...[truncated 2028 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/exporter.js:107
Finding

Arbitrary Writable-File Overwrite Through Unrestricted Export Path

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (37)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · HELP.md (reported line 373)May include surrounding context.

Q5: 如何删除已保存的内容?

A: 手动删除文件:

bash
rm memory/2026-03-25.md

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The implemented code is a narrow summarization module. It can summarize provided text, identify a rough topic, and extract likely conclusion sentences, which partially aligns with the '总结对话' aspect. However, the declared description is broader and claims structured extraction of 待办/想法/决策 plus export/search of conversations and ongoing evolution, none of which are implemented here. The declared permissions 'sessions_history' and 'memory_write' are also unused in this code chunk. This is a material description-to-behavior mismatch because the actual code supports only summarization-related functionality, not the wider conversation assistant capabilities described.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Scope Creep

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The exporter writes attacker-influenced content to an attacker-controlled path using fs.writeFileSync without any path validation, sandboxing, or permission gating. In this skill context, exported data may contain sensitive conversation history, and arbitrary file writes can overwrite local files or place sensitive data in unintended locations, exceeding the declared permissions of the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger set includes very broad terms like '总结', 'miner', and 'conversation', which can match ordinary user speech and cause the skill to activate unexpectedly. In a skill with access to session history and memory writing, accidental activation increases the chance of unintended analysis of private conversations and follow-on prompts to persist extracted content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The help text says the skill will 'automatically get today's conversation history' but does not present this as a prominent privacy warning or require explicit informed consent before collection. Because the skill has sessions_history permission, users may unknowingly expose sensitive content from the current day during a summary request.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill is explicitly designed to gather conversation history and potentially save structured extracts derived from it, creating a data retention risk for secrets, personal data, or confidential project details. Even without malicious intent, this natural-language workflow encourages collection and storage of sensitive material in a reusable form.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document explains how data is saved into persistent memory files but frames it as a feature rather than a clear retention warning with implications for sensitive information. Users may not appreciate that summaries, decisions, and extracted items can remain on disk beyond the session and be discoverable later.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The feedback mechanism records user feedback and inferred preferences into memory files, which expands stored data from explicit summaries to behavioral profiling. This creates additional privacy risk because inferred preferences may be sensitive, inaccurate, or retained longer than users expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that the skill will automatically obtain current conversation history, but it does not clearly warn users that private or sensitive content in the session may be analyzed. In the context of a skill designed to mine conversations, omission of an explicit privacy disclosure weakens informed consent and increases the chance of users unknowingly exposing sensitive material to structured extraction.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrase “总结对话” is broad and likely to collide with ordinary user requests, causing the skill to activate in situations where the user may only want a normal summary rather than tool-assisted mining of session history. Because this skill has access to sessions_history and can later prompt for memory persistence, ambiguous activation increases the risk of unintended analysis of sensitive conversation content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The phrase “提取待办” is ambiguous because it can naturally appear in ordinary conversation and does not clearly signal that the skill will inspect current session history. In this skill’s context, accidental activation could expose more conversational context than the user intended and lead to unwanted extraction or later storage of action items derived from sensitive discussion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Exporting conversations to Markdown can create durable copies of sensitive chat data, but the README does not warn users about exposure, local storage, or downstream sharing risks. This is more dangerous here because the skill’s stated purpose is to extract and structure potentially valuable information, which can make accidental disclosure easier and more scalable.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

“搜索对话” is especially broad because searching conversations implies access to potentially large amounts of historical or current chat content, yet the trigger does not define boundaries or user confirmation. In a skill with sessions_history permission, a generic phrase like this can cause unintentional retrieval or processing of sensitive prior exchanges.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill’s natural-language instructions, triggers, prompts, and example replies are written entirely in Chinese, and user response options are prescribed in Chinese except for a limited "yes" variant. There is no indication that the user may choose another language, which creates a language-policy concern if the broader environment does not require Chinese-only operation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger set contains broad, common phrases like '总结' and 'conversation', which can cause the skill to activate unintentionally during unrelated chats. Because the skill has access to session history and memory_write, accidental activation can lead to unnecessary analysis of prior messages or prompts to persist derived data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs automatic retrieval of conversation history without a clear upfront privacy notice or consent gate. Users may not realize that invoking a summary command can cause the assistant to inspect a large portion of prior dialogue, which increases the chance of exposing sensitive content beyond what they intended to share in the current turn.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs broad retrieval and summarization/export of conversation history, creating a real data exposure risk. Summarizing prior user and assistant messages can surface secrets, personal data, credentials, or confidential project details that were not necessary for the immediate request and may then be displayed back in a condensed form.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The evolution/feedback section directs the assistant to store user feedback, preferences, and conversation-derived summaries into memory, which can persist sensitive personal or organizational information beyond the original interaction. Persistent storage raises the risk of long-term retention, secondary use, and later unintended disclosure via future prompts or summaries.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The templates repeatedly instruct fetching up to 200 recent messages and extracting user/assistant content, which is broader than many summary requests require. Large-scale history access materially increases the chance of processing and revealing unrelated sensitive information from earlier parts of the session.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

All user-facing help text, prompts, errors, and natural-language triggers are written in Chinese, which enforces a specific language/locale behavior. The file does not provide a user option to select another language or indicate that the locale restriction is intentional and limited to a justified region-specific use case.

Content

No source excerpt is available for this finding.

Scope Creep

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The export path is taken from --output and passed to exporter.exportToFile without visible path restriction, sandboxing, or confirmation. That enables writing conversation-derived content to arbitrary filesystem locations reachable by the process, which can lead to unintended disclosure of chat history or overwriting user files if this CLI is invoked by an agent or automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language handler routes any input containing "导出" directly to the export path, which may write stored conversation content to disk via the export command. Although success/failure is printed after the fact, there is no prior disclosure or confirmation in this invocation path that exporting persists potentially sensitive conversation data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The package description is written as a Chinese-only assistant description ('对话价值提取助手') and does not indicate that users can choose another language. This creates a natural-language locale constraint without user opt-in, which matches the policy-violation category for language or locale restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This JavaScript file includes natural-language comments and user-visible fallback/output text entirely in Chinese, such as the module description and defaults like '对话记录' and '未分类'. Under the language/locale policy, forcing a specific language without user opt-in or documented regional justification is a policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.