Back to skill

Security audit

memory-auto-update

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local memory saver, but its broad automatic triggers and unsafe file-writing helper create review-worthy privacy and data-integrity risks.

Install only if you are comfortable with the assistant saving parts of current conversations to local memory. Prefer manual mode, review memory files regularly, avoid direct execution of the helper scripts, and treat the package as needing fixes for path validation, safer test code, clearer trigger boundaries, and clearer retention controls before broad use.

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

Warning
Location
scripts/write_memory.py:27
Finding

Path Traversal Enables Unauthorized Access to Markdown Files

Content
View full analysis
str: """ Get the memory file path. Args: date: Date string, defaults to the current date. Returns: Memory file path. """ if date is None: date = datetime.now().strftime('%Y-%m-%d') return os.path.join(self.memory_dir, f'{date}.md') ``` The generated path is subsequently used by the public file operations: ```python def write(self, content: str, date: str = None, append: bool = True) -> bool: file_path = self.get_memory_file_path(date) ... with open(file_path, mode, encoding='utf-8') as f: f.write(content) ``` ```python def exists(self, date: str = None) -> bool: return os.path.exists(self.get_memory_file_path(date)) ``` ```python def read(self, date: str = None) -> Optional[str]: file_path = self.get_memory_file_path(date) if os.path.exists(file_path): with open(file_path, 'r', encoding='utf-8') as f: return f.read() return None ``` ### Technical Analysis The `date` parameter is treated as a trusted filename component without validation or canonicalization. It can contain directory traversal sequences such as `../`, directory separators, or an absolute path. For example, a value such as `../../notes/private` produces a path ending in: ```text /memory/../../notes/private.md ``` After filesystem path resolution, this points outside the intended memory directory. If the supplied value begins with an absolute path separator, `os.path.join()` can discard the configured memory directory entirely. The flaw affects `write()`, `read()`, and `exists()`. The `.md` suffix limits direct access to paths ending in that extension, but it does not enforce containment within the m ...[truncated 1462 chars]
Remediation
View remediation
str: parsed = datetime.strptime(date, "%Y-%m-%d") normalized = parsed.strftime("%Y-%m-%d") if normalized != date: raise ValueError("Invalid date format") return normalized ``` 2. Reject absolute paths, directory separators, traversal components, null bytes, and any value that is not a valid date. 3. Resolve both the memory directory and target path, then enforce containment: ```python from pathlib import Path base = Path(self.memory_dir).resolve() target = (base / f"{validated_date}.md").resolve() if target.parent != base: raise ValueError("Target path escapes the memory directory") ``` 4. Define a policy for symbolic links. For sensitive storage, reject symlink targets and open files using platform-supported no-follow protections where available. 5. Run the Skill under a dedicated, least-privileged account rather than root. 6. Add tests covering `../`, absolute paths, nested paths, malformed dates, and symlink-based escapes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/write_memory.py:94
Finding

Direct Script Execution Overwrites the Current Production Memory File

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

声明的核心能力是“自动更新记忆”,包括触发管理、模式配置、频率配置以及保存长期记忆等完整机制。但实际代码只是离线文本分析组件:通过正则提取若干类潜在记忆内容,并简单识别某些提醒关键词。它没有任何持久化、数据库/文件写入、内存状态更新、配置管理、定时调度或触发器处理逻辑,因此其主要行为显著弱于且不同于声明的完整技能能力。虽然“智能识别重要内容”这一部分与代码部分吻合,但整体描述将其包装为自动记忆更新系统,和实际实现存在明显功能落差。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个完整的“自动记忆更新”技能,核心能力应包括从对话中识别重要信息、根据模式与频率自动更新记忆,并在相关指令下保存或总结内容。而这段代码的实际功能仅是对一个外部传入的 memories 数据结构进行文本摘要排版,并提供一个简短的用户确认文案。它没有读取对话、没有提取信息、没有更新任何记忆存储、没有配置管理,也没有处理所列触发场景。因此该代码块与声明的主要用途存在明显的实质性不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是一个具备自动化策略、触发理解和配置管理的记忆更新技能;但提供的代码只是底层文件持久化组件,负责把传入内容写入/读取按日期命名的本地 Markdown 文件。虽然“保存记忆”这一小部分方向相关,但其实际主功能远比声明狭窄,缺少声明中的核心能力,因此属于明显描述与行为不符。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` - 本文件,使用说明

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README emphasizes convenience and privacy but does not prominently warn users that conversation content may be automatically written to local storage. In a memory-saving skill, insufficient disclosure undermines informed consent and may lead users to reveal sensitive information that is retained unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented trigger phrases are very broad, including ordinary conversational text such as 'remember this', 'that's all for today', and 'you forgot?'. In a skill that automatically updates memory, broad triggers can cause unintended activation and persistence of user content without clear, deliberate consent, increasing privacy and integrity risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documentation explicitly describes reading and writing memory files, but it declares no tool scope or permission boundaries. In a memory-management skill, undeclared file access increases the risk of overbroad or unintended filesystem operations because the host may not constrain what paths can be read or written.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases include common conversational language such as '记下来', '别忘了', 'remember this', and 'that's all for today', which can easily occur in ordinary chat. In a skill that may persist data to memory files, broad triggers can cause unintended activation and storage of user content without sufficiently explicit intent or context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-reference and trigger tables normalize vague everyday expressions as activators without defining strict boundaries for when persistence should occur. Because this skill's context is memory capture and file writing, accidental activation is more dangerous than in a read-only assistant: it can create unintended records, privacy leakage, or polluted long-term memory.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly advertises broad conversational triggers such as 'remember this', 'don't forget', 'that's all for today', and complaint-style phrases like 'did you forget'. Because these are common everyday utterances, the skill may activate unintentionally and perform memory-writing behavior without clear user intent, increasing the risk of oversaving sensitive or irrelevant conversation content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JSON file contains user-facing mode and frequency labels entirely in Chinese, with no indication that users can opt into another language or locale. Per the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code defines the skill's description, comments, user-facing apology text, and extraction patterns entirely in Chinese. That creates a language policy concern because the skill appears to force a specific language/locale without any user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing text, comments, docstrings, section headers, and prompts entirely in Chinese, including the confirmation prompt returned to the user. Under the policy, a skill should not force a specific language or locale unless it offers a choice or clearly documents a justified locale constraint; this file does neither.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains all user-facing docstrings, menu text, and prompts in Chinese, including the main description and settings menu. Because the skill does not provide any language-selection mechanism or state that it is intentionally limited to Chinese users, it may violate language/locale policy requiring user choice or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code includes natural-language descriptions and console messages exclusively in Chinese, starting with the module docstring and continuing throughout the file. The policy requires avoiding forced language or locale unless the skill offers user choice or clearly documents a justified locale constraint, which is not present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The date parameter is used directly to construct a filename via os.path.join(self.memory_dir, f'{date}.md') with no validation or normalization. An attacker who can influence date could supply path traversal sequences such as ../../../etc/passwd or absolute-path-like inputs, causing reads and writes outside the intended memory directory; because this component supports both read() and write(), the issue can lead to arbitrary local file overwrite or disclosure within the process's permissions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger examples include very common conversational phrases such as '这个很重要,记下来', '更新记忆', and '今天就这样', which can easily appear in normal dialogue without a deliberate intent to invoke a memory-write workflow. In a skill that persists data, broad triggers increase the risk of accidental invocation, unintended summarization, and storage of sensitive or low-quality information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction '不用记住命令,怎么自然怎么说' encourages unconstrained natural-language activation, removing clear boundaries between ordinary conversation and privileged memory operations. This makes accidental triggering far more likely and weakens user awareness of when data is being extracted, summarized, or persisted.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Phrases like '你忘了吗?' and '你记性太差了!' are ordinary expressions of frustration, not explicit security-scoped commands, yet the skill treats them as triggers for reviewing recent conversation and extracting important content. In context, this is risky because it can initiate data processing from ambiguous social language rather than intentional user authorization.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The examples '更新记忆', '保存一下', and '记录今天的对话' remain broad and do not define scope, eligibility, or safeguards for what content will be processed. Because this skill writes to memory, broad trigger wording can cause overcollection, accidental persistence, or invocation by incidental phrasing during unrelated tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The FAQ states that multiple conversations save into the same memory file, but does not warn users about cross-session contamination, privacy leakage, or the possibility that one session's content may affect another session's outputs. In a memory-updating skill, shared persistence across sessions materially raises the risk of unintended data mixing, retention of sensitive information, and integrity issues in future interactions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The primary description is written only in Chinese even though the manifest declares support for both zh-CN and en. This can indicate a language/locale preference being imposed in user-facing text without clarifying user choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The template headings and field labels are entirely in Chinese, which imposes a specific language/locale on users. The file does not offer an alternative language option or explain that the template is intended only for a Chinese-language context.

Content

No source excerpt is available for this finding.