Back to skill

Security audit

Nova Memory

Security checks for vulnerabilities and agentic risk

Overview

This is a local memory tool with no evidence of hidden exfiltration, but it persistently stores arbitrary user and entity data with weak scoping and privacy controls.

Review before installing if the workspace may contain secrets, personal data, customer data, or shared-project information. Use only a confined storage path, avoid storing credentials or sensitive facts, and consider adding explicit consent, retention/deletion controls, owner-only file permissions, and terminal-output sanitization before relying on it.

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
src/memory_core.py:42
Finding

Sensitive memory data is stored without restrictive filesystem permissions

Content
View full analysis
None: """Ensure the directory exists.""" path.mkdir(parents=True, exist_ok=True) ``` ```python # Write file path = self.memories_dir / f"{memory_id}.json" path.write_text(json.dumps(record, ensure_ascii=False, indent=2), encoding="utf-8") ``` ```python def save(self) -> None: """ Persist in-memory state to disk. """ _ensure_dir(self.storage_dir) # entities with open(self.entities_path, "w", encoding="utf-8") as f: json.dump(self._entities, f, ensure_ascii=False, indent=2) # inverted tag index with open(self.index_path, "w", encoding="utf-8") as f: json.dump(dict(self._tag_index), f, ensure_ascii=False, indent=2) # meta meta = { "saved_at": _utc_now(), "total_memories": len(self._memories), "total_entities": len(self._entities), "total_tags": len(self._tag_index), } with open(self.meta_path, "w", encoding="utf-8") as f: json.dump(meta, f, ensure_ascii=False, indent=2) ``` ```python def __init__(self, storage_dir: str = "/workspace/memory/nova-memory/"): self.storage_dir = Path(storage_dir) self.storage_dir.mkdir(parents=True, exist_ok=True) self.db_path = Path(storage_dir) / "memory_olap.db" self._init_db() ``` ### Technical Analysis The application stores arbitrary memory content, entity facts, tags, indexes, and analytics in JSON and SQLite files. These records may contain private or otherwise sensitive information. The directories and files are created without explicitly enforcing owner-only permissions. Their effective modes therefore depend on the process umask and the permissions of pre-existing files an ...[truncated 1584 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/memory_cli.py:62
Finding

Untrusted stored text is rendered without terminal control-character sanitization

Content
View full analysis
100 else ''}{tags_str}{entity_str}") print(f" ↳ ID: {r['id']} | 创建: {r.get('created_at', 'N/A')[:10]}\n") ``` ```python print(f"👤 实体「{args.name}」:") for k, v in info.items(): if not k.startswith("_"): print(f" {k}: {v}") ``` ```python for r in results: entity_str = f" 👤 {r.get('entity', '')}" if r.get("entity") else "" print(f" • {r['content'][:100]}{'…' if len(r['content']) > 100 else ''}{entity_str}") print(f" ID: {r['id']} | 创建: {r.get('created_at', 'N/A')[:10]}\n") ``` ```python # Entity nodes entities = [n for n in graph["nodes"] if n["type"] == "entity"] if entities: print("👥 实体节点:") for e in entities: facts = e.get("facts", {}) fact_str = " | ".join(f"{k}={v}" for k, v in list(facts.items())[:4]) print(f" ● {e['label']} {('(' + fact_str + ')') if fact_str else ''}") print() # Edges edges = graph.get("edges", []) if edges: print(f"🔗 关系边(共 {len(edges)} 条):") for edge in edges[:20]: print(f" {edge['from']} --[{edge.get('label', 'related')}]--> {edge.get('to', '')}") ``` ### Technical Analysis Memory content, tags, entity names, fact keys, and fact values originate from user-controlled input and are persisted without restricting terminal control characters. Multiple CLI commands later print these values directly to an interactive terminal. Text truncation does not neutralize escape sequences. ANSI CSI ...[truncated 1728 chars]
Remediation
View remediation
str: text = str(value) text = text.replace("\x1b", r"\x1b") return CONTROL_CHARS.sub( lambda match: f"\\x{ord(match.group()):02x}", text, ) ``` 4. Apply sanitization before truncation so an escape sequence cannot survive in a shortened preview. 5. Consider a structured output mode such as JSON for automation. Keep raw terminal rendering disabled by default, or expose it only through an explicit option for trusted data. 6. Add regression tests containing CSI and OSC payloads and verify that output contains visible escaped representations rather than executable terminal sequences. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger words are broad, common terms such as remember, search, tag, and graph, which can cause the skill to activate during ordinary conversation or unrelated tasks. In this skill's context, unintended activation is more dangerous because it may store sensitive user content locally or perform memory operations without the user explicitly intending to use persistent storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is designed to store user-provided content, entity facts, and generated reflections on disk, yet the description does not prominently warn that sensitive information may be persisted locally and later propagated into project memory files. In an agent workspace, this can lead to silent retention of personal, confidential, or project-sensitive data beyond the user's expectation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation asserts that all files stay under /workspace, but the public API example explicitly allows callers to pass an arbitrary storage_dir. In an agent environment, this mismatch can enable writes outside the claimed boundary, causing accidental overwrite of other project files or persistence in unintended locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The CLI stores user-provided content and then saves it to disk, but there is no warning in the docstring or command help that submitted content will be persisted under the workspace storage directory. Although success is printed after the save, that is not a prior disclosure about retention of potentially sensitive user data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entity add flow saves structured facts about a named entity, which may include personal or sensitive information, but the CLI description and argument help do not warn users that these facts are stored persistently. The post-action success output confirms completion but does not satisfy the requirement for user disclosure beforehand.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The remember() API writes arbitrary user-provided content directly to disk as JSON without any consent mechanism, retention control, or sensitivity filtering. In a memory/assistant context, this can silently persist secrets, personal data, or credentials that users may not expect to be stored beyond the current session, increasing privacy and data exposure risk if the workspace is shared or later compromised.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The memory and recall workflow is designed to retain, index, and later surface arbitrary user-provided text, with no boundary for secrets, sensitive personal information, or unsafe content classes. In an agent memory system, this increases the chance that confidential data is stored, retrievable by later prompts, or exposed through summaries and search results beyond the original context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The remember_entity method records structured facts about named entities in memory, and those facts are later persisted by save() to entities.json. The code comments describe structure but do not provide a user-facing warning that potentially sensitive personal or organizational facts may be retained on disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and all user-facing report strings are written in Chinese, and the generated report in full_report is hard-coded to Chinese labels and trend text. This imposes a specific language/locale on users without any opt-in or documented justification, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The top-level description presents the skill as a pure-Python local semantic memory tool, and the directory structure lists only src/memory_core.py and scripts/memory_cli.py. Later, the document introduces an additional memory_olap.py SQLite analysis module that is not reflected in the declared structure or core capability summary, creating an internal documentation mismatch about the actual shipped components.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

All user-facing natural-language strings, including the title, usage examples, help text, and output messages, are in Chinese with no indication of language choice or opt-in. This can violate language/locale policy when a skill imposes a specific language by default rather than allowing user selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This file presents its primary descriptive and user-facing strings in Chinese, while the TF-IDF vectorizer is configured with English stop words, which implicitly privileges a specific language setup. There is no indication that users can choose language or locale behavior, so the skill appears to enforce a language/locale assumption without opt-in.

Content

No source excerpt is available for this finding.