Back to skill

Security audit

曙光记忆系统

Security checks for vulnerabilities and agentic risk

Overview

This is a real local persistent-memory skill, but it stores and recalls broad user content with weak controls and some misleading durability/scope claims.

Install only if you intentionally want a local cross-session memory system and are comfortable with user preferences, decisions, errors, and learning notes being written in plaintext under the OpenClaw workspace. Do not use it for secrets, credentials, regulated data, or multi-user/project environments until scope isolation, WAL accuracy, permissions, retention, and deletion controls are fixed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
shuguang_hybrid_memory.py:280
Finding

Scope Filtering Bypass in Hybrid Memory Recall

Content
View full analysis
List[Dict]: """ 混合检索回忆 流程: 1. 向量搜索 (语义相似度) 2. BM25搜索 (关键词匹配) 3. 分数融合 (0.7*向量 + 0.3*BM25) 4. Weibull衰减加权 5. 过滤低分记忆 """ query_vec = self._simple_vectorize(query) # 1. 向量搜索 vector_scores = {} for eid, entry in self.entries.items(): if scope and entry.scope != scope: continue if entry.vector: sim = self._cosine_similarity(query_vec, entry.vector) vector_scores[eid] = sim # 2. BM25搜索 bm25_results = self.bm25.search(query, top_k=max(top_k * 3, 20)) bm25_scores = {eid: score for eid, score in bm25_results} # 3. 分数融合 + 衰减加权 combined = {} all_ids = set(vector_scores.keys()) | set(bm25_scores.keys()) for eid in all_ids: entry = self.entries.get(eid) if not entry: continue v_score = vector_scores.get(eid, 0.0) b_score = bm25_scores.get(eid, 0.0) ``` ### Technical Analysis The `scope` restriction is applied only while calculating vector-search scores. The BM25 index searches all stored documents without applying the requested scope. The code subsequently forms `all_ids` by taking the union of the scope-filtered vector IDs and the unfiltered BM25 IDs. A memory entry excluded from vector search because it belongs to another scope can therefore be reintroduced by BM25 and processed as a valid result. This breaks the apparent access-control boundary represented by the `global`, `agent`, `project`, and `user` scopes. The flaw is particularly significant if a single `memory_store.json` is shared among users, agents, or projects that are not mutually trusted. ### Attack Path 1. A memory entry contai ...[truncated 1126 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
shuguang_hybrid_memory.py:192
Finding

Sensitive Memory and Governance Data Stored in Plaintext

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims stronger architecture and safeguards than appear to exist, including a five-layer lifecycle and WAL semantics. Security-relevant documentation mismatches are dangerous because operators may rely on nonexistent retention controls, archiving, or durability guarantees while the implementation stores data differently or less safely than advertised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code advertises WAL semantics and claims 'write-before-answer' behavior, but wal_sync never writes the declared target file. In a memory/governance skill, this can cause users or downstream agents to assume persistence, synchronization, or auditability that never occurred, leading to silent state loss and inconsistent decision-making based on nonexistent durable records.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The docstring explicitly states that the function writes to the target file, but the implementation only logs to learning/memory stores. This creates a dangerous integrity gap: callers may rely on the function for durable state synchronization and continue operating under false assumptions, which is especially risky for cross-session memory and governance workflows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill describes file read/write behavior but does not declare any tool scope or permissions boundary. In an agent environment, undeclared persistence capabilities can cause the model to write or read local files without explicit operator awareness, weakening least-privilege controls and increasing the chance of unintended data retention or disclosure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger condition is broad enough that the skill may activate for many normal conversations involving recall, preference tracking, or continuity. In context, that broad trigger increases the chance of silently persisting sensitive user content across sessions when persistence was not necessary or expected.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The architecture explicitly promotes long-term storage of user preferences and session content across conversations, including permanent core records. In a memory skill, that context makes the issue more dangerous because the whole design encourages broad, durable profiling without visible limits on consent, retention minimization, or data subject control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation instructs persistent file-based writes without warning that user data may be stored across sessions on disk. This is dangerous because users may disclose preferences, decisions, or sensitive facts believing they are ephemeral, while the skill turns them into durable records that may later be exposed, misused, or retained longer than intended.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction to write user-provided information to persistent storage before responding creates a default exfiltration-to-disk behavior for all qualifying content. This is particularly risky because it removes deliberation, consent, and sensitivity filtering, so secrets, personal data, and contextual conversation details may be stored automatically and repeatedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The examples normalize long-term storage of user preferences and decision history without any accompanying warning, minimization guidance, or consent flow. Examples strongly shape downstream use, so showing persistence of potentially sensitive behavioral and decision data can lead to unsafe deployments and privacy violations by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language description is entirely in Chinese and provides no indication that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes '五层金字塔架构 (HOT→DAILY→WEEKLY→CORE→ARCHIVE)', implying five distinct memory layers and archival behavior. In code, the only lifecycle model is WeibullDecay.TIERS with core, working, and peripheral, and persistence is a single memory_store.json, so the implemented behavior does not match the advertised architecture.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

store persistently writes arbitrary caller-supplied text and derived summaries to disk under the user's home directory with no consent, disclosure, retention controls, or sensitivity filtering. In a memory skill, that is dangerous because users may provide secrets, personal data, or proprietary content that then becomes silently durable and available for later retrieval or exfiltration.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The memory engine stores full-text details (l2_detail and text) and later returns them verbatim via recall, creating a straightforward natural-language leakage path for prior sensitive inputs. Because the skill is explicitly for persistent cross-session memory, the context makes this more dangerous: recalled content may include credentials, personal data, internal decisions, or proprietary user material from earlier interactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The forget() and cleanup() methods delete stored memory entries, including automatic cleanup based on decay thresholds, but provide no confirmation prompt, user-visible logging, or explicit warning. This creates a risk of silent data loss for persisted memory records.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

log_error and log_learning append raw context, errors, insights, and actions to persistent markdown files without any sensitivity checks or user disclosure. Because these fields can contain user prompts, secrets, file paths, internal reasoning summaries, or operational data, the logs can become a durable leakage surface that is easy to inspect, back up, or accidentally disclose.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The governance helpers are designed to persist and reuse arbitrary user-provided content across LEARNINGS.md, memory storage, and WAL-related flows without any sensitivity classification or policy gate. In the context of a cross-session memory skill, this materially increases the chance of propagating secrets, personal data, and confidential context into long-lived stores that can later be recalled or exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

wal_sync takes arbitrary supplied content and stores it into both persistent logs and the memory engine without warning, effectively duplicating potentially sensitive material across multiple files. This increases the blast radius of any sensitive input and makes later deletion harder because the same content may exist in several persistence layers.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The skill content is entirely presented in Chinese and names the system and behavior in a way that suggests a fixed language experience, but there is no statement offering language choice or documenting a justified region-specific scope. This may conflict with organizational language/locale policy if users are not given an opt-in or alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstrings and operational descriptions are presented exclusively in Chinese, including key behavioral explanations and trigger-like descriptions for governance actions. There is no indication that the user can choose language or that the skill is intentionally limited to a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.