Back to skill

Security audit

Narrative Memory

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned as a personal narrative memory tool, but it persistently stores sensitive personal text in plaintext while documentation overstates privacy protections.

Install only if you are comfortable with a local tool storing personal reflections, emotional context, values, and decision history under ~/.openclaw/workspace/.soul. Treat the current privacy claims cautiously: reviewed code stores raw narrative text in plaintext and does not implement the documented encryption or deletion controls. Prefer requiring explicit confirmation before automatic capture and update dependencies before 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/narrative.js:377
Finding

Plaintext Persistence of Sensitive Personal Narratives

Content
View full analysis

Vulnerability Details

File Location: scripts/narrative.js:377-382 and scripts/narrative.js:441-444
Vulnerability Type: Plaintext storage of sensitive personal data
Risk Level: Medium

Vulnerable Code

js
content: {
  core_statement: extractCoreStatement(text),
  detailed_description: text.substring(0, 500),
  source_text: text
},
js
function saveNarrative(narrative) {
  ensureFiles();
  
  const line = JSON.stringify(narrative) + '\n';
  appendFileSync(NARRATIVE_PATH, line, 'utf-8');
  
  console.log(`叙事记录已保存: ${narrative.id}`);
  console.log(`标题: ${narrative.title}`);
  console.log(`重要性: ${narrative.analysis.importance_score.toFixed(2)}`);
}

Technical Analysis

The Skill records the complete input in content.source_text, along with a summary, emotional context, detected values, decisions, and inferred behavioral patterns. saveNarrative() serializes this information directly into a plaintext JSONL file at:

text
~/.openclaw/workspace/.soul/narratives.jsonl

No encryption-at-rest mechanism or explicit restrictive file mode is applied. Consequently, the file permissions are determined by the process umask and surrounding directory permissions rather than being securely enforced by the Skill.

This is particularly significant because the intended data includes personal decisions, emotional changes, reflections, values, and life events. Repeated operation creates a persistent behavioral profile rather than a single low-value record.

The behavior also conflicts with the encryption claim in references/narrative-guidelines.md:309-312, which states that records are locally encrypted. No corresponding encryption implementation was found. The documentation also describes user deletion rights, but no record-deletion command is implemented in the audited scripts.

Attack Path

  1. A user or local automation invokes the Skill with personal text through --process-text, --process-signal, or daily-context processi ...[truncated 1221 chars]
Remediation
View remediation

Remediation Suggestions

  1. Encrypt narrative and accumulation data at rest with an authenticated-encryption construction such as AES-256-GCM.
  2. Store encryption keys outside the narrative files, preferably in an operating-system credential store or appropriately secured key-management facility.
  3. Create the .soul directory with mode 0700 and sensitive files with mode 0600; verify and correct permissions on existing files.
  4. Do not retain source_text by default. Store only the minimum summary needed for the feature, and require explicit user opt-in for full-text retention.
  5. Add configurable retention periods and automatic deletion for old records.
  6. Implement commands that let users list, inspect, export, redact, and permanently delete individual or all narrative records.
  7. Use atomic, permission-preserving writes for state and configuration files.
  8. Update the documentation so encryption and deletion claims precisely match implemented behavior.
  9. Provide a migration utility that encrypts or securely removes existing plaintext records.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The English finding indicates the implementation mainly performs persistent configuration read/write under a workspace path and CLI configuration management, while not actually implementing the promised narrative-memory functions. A skill that stores data persistently without clearly delivering its advertised purpose is risky because it can normalize hidden retention of sensitive personal information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The English finding indicates the implementation mainly performs persistent configuration read/write under a workspace path and CLI configuration management, while not actually implementing the promised narrative-memory functions. A skill that stores data persistently without clearly delivering its advertised purpose is risky because it can normalize hidden retention of sensitive personal information.

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 12)May include surrounding context.

md
node scripts/narrative.js <命令> [选项]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/narrative.js <命令> [选项]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/narrative.js <命令> [选项]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/narrative.js <命令> [选项]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/narrative.js <命令> [选项]

Known Vulnerable Dependency: brace-expansion==1.1.13 — 3 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro); CVE-2026-69152 (brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-1)

High
Category
Supply Chain
Confidence
80% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: browserslist==4.28.2 — 2 advisory(ies): CVE-2026-73088 (Browserslist: Uncaught crash / prototype write via untrusted browserslist-stats.); CVE-2026-73089 (Browserslist: Unbounded memory growth (no cache eviction) via distinct query res)

High
Category
Supply Chain
Confidence
80% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: js-yaml==3.14.2 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill exposes executable code paths and likely environment access but declares no explicit tool scope or permissions. That makes its runtime capabilities opaque to users and reviewers, increasing the chance of unintended access to local state or environment-derived secrets without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Broad activation criteria such as milestones, key decisions, emotional turns, and deep reflection can easily overlap with ordinary conversation. In a memory-capture skill, overbroad triggers increase the risk of collecting sensitive personal content when the user did not intend to invoke persistent recording.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is explicitly about recording meaningful life events, which are inherently sensitive, yet the description does not warn users that personal memories may be stored. Lack of notice undermines informed consent and increases privacy risk, especially for emotional, values-based, or first-experience content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Automatic signal-processing integration implies the skill can record or react to events autonomously, but no warning is given about background or indirect recording behavior. For a personal-memory system, silent automation materially raises the risk of unexpected capture of highly sensitive life events.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description is written entirely in Chinese and presents the skill as a general-purpose system, but does not indicate that use of Chinese is optional or that the skill is intentionally limited to a Chinese-language audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The accumulation layer stores snippets of user inputs across topics, emotions, and value tendencies over time, enabling longitudinal profiling of the user's concerns, emotional states, and principles. Even though each snippet is truncated, the design still performs long-term collection of sensitive behavioral and psychological data without meaningful minimization.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Narrative records intentionally retain full user text in source_text along with core statements and descriptions, creating a durable plain-language memory store of potentially intimate disclosures. This increases the blast radius of any local compromise, accidental sharing, later output exposure, or misuse by other components reading the same workspace.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persists user-provided narrative text and derived summaries to local files under a hidden workspace directory without any consent flow, warning, minimization, or protection mechanism. Because this skill is explicitly designed to capture meaningful life events, the stored content is likely to include highly sensitive personal, emotional, and values-related data, making silent retention a real privacy and security issue.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The timeline and pattern-analysis features are built to read back and display previously stored narrative content and behavioral summaries, which creates a straightforward re-exposure path for sensitive data. Once collected, the system makes that data easy to enumerate and output, increasing the likelihood of accidental disclosure through console use, logs, screenshots, or upstream agent tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The daily context analysis function prints summary, mood, key events, and proactive observations directly to stdout, which can expose sensitive personal information to logs, terminals, calling processes, or other users on the system. In an agent environment, stdout is often captured centrally, so seemingly local prints can become broader disclosures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing text such as console messages and next-step instructions entirely in Chinese. The policy allows locale constraints only when the skill offers opt-in language choice or clearly documents and justifies the restriction, which is not evident in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

Core descriptive and operational text such as the description and command explanations are written in Chinese, with no indication that users can choose another language. This may violate a language/locale policy where skills should not force a specific language absent opt-in or clear justification.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: @babel/core==7.29.0 — 1 advisory(ies): CVE-2026-49356 (@babel/core: Arbitrary File Read via sourceMappingURL Comment)

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: baseline-browser-mapping==2.10.13 — 1 advisory(ies): CVE-2026-45819 (baseline-browser-mapping process termination on invalid input causes denial of s)

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: mongoose==8.23.0 — 1 advisory(ies): CVE-2026-73562 (Mongoose: Prototype pollution in mongoose update casting via __proto__-prefixed )

Low
Category
Supply Chain
Confidence
90% confidence
Finding

mongoose 8.23.0 is a production transitive dependency brought in through natural, and prototype-pollution flaws can become dangerous if untrusted objects are passed into update/query casting paths. Even though this lockfile does not prove active MongoDB use, pulling a vulnerable ORM/database layer into a personal-memory skill unnecessarily expands attack surface and could enable object pollution, application instability, or security control bypass if the package is exercised.

Content

No source excerpt is available for this finding.