Back to skill

Security audit

Micro Memory

Security checks for vulnerabilities and agentic risk

Overview

This is a local memory tool, but it needs review because it stores personal memory data persistently, has broad automatic triggers, ships a broken package manifest, and includes an unsafe alternate command launcher.

Review carefully before installing. Do not store secrets or highly sensitive personal data unless you are comfortable with plaintext local files, markdown backups, archives, and exports. Avoid using bin/memory.js; use only the declared dist/index.js entry point after the package manifest is fixed. Treat CSV exports as untrusted if memory content can come from other people, and prefer explicit memory commands over broad auto-trigger 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
bin/memory.js:9
Finding

Shell Command Injection in Alternate CLI Launcher

Content
View full analysis
{ // Properly escape arguments for Windows if (arg.includes(' ') || arg.includes('"')) { return `"${arg.replace(/"/g, '\\"')}"`; } return arg; }).join(' '); try { execSync(`node "${distPath}" ${args}`, { stdio: 'inherit', windowsHide: true }); ``` ### Technical Analysis The launcher concatenates user-controlled command-line arguments into a single string and passes that string to `execSync`. When `execSync` receives a string, Node.js executes it through the platform shell. The custom escaping only handles spaces and double quotes. It does not safely encode shell metacharacters such as: - `;`, `|`, `&`, `$()`, and backticks on POSIX shells - `&`, `|`, `^`, `%`, and redirection operators on Windows command interpreters Arguments without spaces or double quotes are inserted without any escaping. Quoting arguments with spaces also does not provide portable shell escaping. Consequently, an attacker who can influence an argument passed to this launcher may terminate or extend the intended command and execute an additional operating-system command. Although the current npm `bin` mapping points to `dist/index.js`, this alternate launcher remains directly executable and is explicitly implemented as a CLI entry point. ### Attack Path 1. A user, automation system, or Agent invokes `node bin/memory.js` with an attacker-influenced argument. 2. The launcher joins that argument into the `args` string. 3. The string is interpolated into ``node "${distPath}" ${args}``. 4. `execSync` submits the resulting string to the system shell. 5. The shell interprets embedded metacharacters and executes the injected command. A POSIX attack can have ...[truncated 754 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/archive.ts:99
Finding

Spreadsheet Formula Injection in CSV Export

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/utils.ts:156
Finding

Denial of Service Through Unbounded User-Controlled Regular Expressions

Content
View full analysis
Remediation
View remediation
200 || text.length > 10_000) { return false; } ``` Length restrictions alone are not a complete defense against catastrophic backtracking, so they should be combined with a safe engine or execution timeout. Rebuild the compiled `dist` files after remediation. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (27)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file lists commands such as memory delete, memory compress, memory archive, and memory export, which can delete, alter, move, or disclose stored user memory data. The description does not provide any warning about data loss, privacy implications, backups, or confirmation behavior, so users are not alerted to safety-relevant effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The documentation states that memory contents are stored in local files such as store/store.md and index.json, and elsewhere mentions export to JSON/CSV. Because this skill stores potentially sensitive user memory content on disk and supports export, the markdown should warn users about local data exposure and handling of exported files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill explicitly describes persistent storage, backups, and archiving of user memories, but does not warn users about retention, restoration, or the sensitivity of stored content. For a 'second brain' tool, this increases privacy risk because users may disclose intimate or confidential information without understanding that it will be retained across multiple local files and archives.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented auto-trigger phrases are broad, natural-language commands that can appear in ordinary conversation, which makes unintended invocation plausible. In a memory skill, accidental triggering can silently store, search, or reveal personal information, especially because the feature is framed as automatic and always-on within the host assistant.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code builds a single shell command string and passes user-controlled arguments into execSync, relying on ad hoc quoting that only handles spaces and double quotes. Shell metacharacters such as &, |, ;, $, backticks, parentheses, and platform-specific quoting/escaping behaviors can still alter command execution, leading to command injection when an attacker controls CLI arguments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The memory manager persists user-provided memory content to disk via save() without any explicit user-facing disclosure, consent flow, or indication that entries are durably stored. In an agent skill context, users may assume 'memory' is transient or session-scoped, so silently writing potentially sensitive prompts, notes, or secrets to local files creates a privacy and data-retention risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

syncToMarkdown() exports the full contents of all memories, including tags, timestamps, and raw content, into a markdown file on every save. This broadens exposure beyond the primary JSON store, increases the number of copies of sensitive data, and does so automatically without explicit disclosure or user approval.

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 returns natural-language strings in Chinese for decay warnings and critical-state alerts. Because the file does not indicate that the skill is China/Chinese-specific or provide any user opt-in for language selection, it violates the policy against forcing a specific language or locale.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list includes common conversational phrases such as "记录", "记住", "找找之前", and "我的记忆", which are broad enough to activate during normal user dialogue rather than explicit tool invocation. In an agent skill context, this can cause unintended execution of memory operations, accidental data capture, or interference with other skills, making it a real safety issue even though it is not inherently malicious.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The export functionality writes the full in-memory dataset, including raw memory content, directly to files in the current working directory without any confirmation, redaction option, or warning about sensitive data exposure. In a memory-management skill, those records are likely to contain personal, confidential, or operationally sensitive information, so accidental export to an insecure location can create a meaningful confidentiality risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function returns natural-language user messages in Chinese only, which forces a specific language on users regardless of their locale or preference. This matches the policy-violation category for language or locale constraints without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code launches a child process via execSync and inherits its stdio, but there is no confirmation prompt, user-facing disclosure, or explanatory comment warning that a subprocess will be executed. For a code file, subprocess execution is a safety-relevant operation that should be disclosed unless clearly communicated as part of the skill's stated purpose within the file or accompanying markdown.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains a natural-language comment in Chinese ('防御性检查:确保 strength.score 是有效数字') while the rest of the file is in English. A mixed-language instruction/comment can violate language policy if the skill implicitly forces a specific language or locale without offering user choice or documenting the constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This .txt file is in scope for vague-trigger checks, but it only enumerates repository files and provides no information about how or when the skill should activate. Without explicit trigger phrases, boundaries, or exclusions, the activation condition is underspecified from this artifact alone.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 60)May include surrounding context.

json
]
  },
  "devDependencies": {
    "@types/node": "^25.5.2",
    "typescript": "^6.0.2"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 61)May include surrounding context.

json
},
  "devDependencies": {
    "@types/node": "^25.5.2",
    "typescript": "^6.0.2"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The inline comment at L040 is written in Chinese while the rest of the file is in English, creating an implicit language constraint for maintainers and reviewers. This is a natural-language policy concern because the file does not offer a language choice or document a justified locale-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The inline comment at L040 is written only in Chinese, creating a language-specific constraint in the skill source without offering any user or maintainer language choice. This can violate language/locale policy expectations when the rest of the file is in English and no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The removeLinksForMemory method deletes link records and immediately saves the modified dataset, which is a destructive operation. In this file there is no confirmation prompt, user-facing warning, or explanatory comment/docstring disclosing that the deletion is persisted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code contains developer-facing natural-language comments in Chinese only (for example, '正则模式', '模糊模式', and '按相关性排序'). This imposes a specific language choice in the file's instructions/comments without offering an alternative or documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This TypeScript file contains multiple natural-language comments and docstrings in Chinese, such as the section header at L095 and function documentation through L219. Under the policy rule for language/locale, this is a forced language choice with no indication of user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON file contains natural-language content in Chinese, and there is no accompanying indication that the language was user-selected or that the skill is intentionally region-specific. Per the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON file contains natural-language content in Chinese, and there is no accompanying indication that the language was user-selected or that the skill is intentionally region-specific. Per the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON file contains natural-language content in Chinese, and there is no accompanying indication that the language was user-selected or that the skill is intentionally region-specific. Per the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This JSON file contains natural-language content in Chinese, and there is no accompanying indication that the language was user-selected or that the skill is intentionally region-specific. Per the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.