Back to skill

Security audit

多身份智能知识体系

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed shared-memory tool, but it can silently store and later retrieve personal cross-agent memories without clear user consent or isolation.

Install only if you are comfortable with a shared, persistent memory database that agents may update and search across personas. Before using it, disable or avoid automatic writes, require explicit confirmation before storing anything, keep sensitive health/family/work details out of it unless intended, and store the KB in a private local directory with restrictive permissions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:105
Finding

Autonomous persistence of conversation content without explicit user consent

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/memory_kb.py:34
Finding

Sensitive memory data is stored in plaintext without enforced restrictive permissions

Content
View full analysis
None: with open(self.memories_file, "a", encoding="utf-8") as f: f.write(json.dumps(entry, ensure_ascii=False) + "\n") def _write_index( self, index_name: str, data: Dict[str, List[str]] ) -> None: index_path = self.index_dir / index_name index_path.write_text( json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8" ) def _write_meta(self, meta: Dict[str, Any]) -> None: self.meta_file.write_text( json.dumps(meta, ensure_ascii=False, indent=2), encoding="utf-8" ) ``` ### Technical Analysis The implementation stores memory contents, source context, personas, categories, tags, relationships, and metadata as ordinary plaintext JSON. It does not explicitly set owner-only permissions on the storage directory or files. Actual permissions therefore depend on the process umask and the security of the selected path. The storage location can also be controlled through `MEMORY_KB_PATH` or `--custom-path`. The implementation does not validate path ownership, reject symbolic links, or verify that the destination is private. If the path points to a shared directory, synchronized folder, or attacker-prepared symbolic link, sensitive records may be disclosed or redirected. Index and metadata files can also reveal sensitive information ...[truncated 1514 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/memory_kb.py:123
Finding

Missing file locking and non-atomic index updates permit concurrent corruption

Content
View full analysis
None: with open(self.memories_file, "a", encoding="utf-8") as f: f.write(json.dumps(entry, ensure_ascii=False) + "\n") ``` ```python def _read_index(self, index_name: str) -> Dict[str, List[str]]: index_path = self.index_dir / index_name if index_path.exists(): return json.loads(index_path.read_text(encoding="utf-8")) return {} def _write_index( self, index_name: str, data: Dict[str, List[str]] ) -> None: index_path = self.index_dir / index_name index_path.write_text( json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8" ) ``` ```python def _write_meta(self, meta: Dict[str, Any]) -> None: self.meta_file.write_text( json.dumps(meta, ensure_ascii=False, indent=2), encoding="utf-8" ) ``` Each store operation appends to the main file and then separately performs multiple index and metadata read-modify-write cycles. These operations are not protected as a single transaction. ### Technical Analysis Appending one JSON line does not make the overall operation atomic. A complete store operation modifies: - `memories.jsonl` - `by_persona.json` - `by_category.json` - `by_tag.json` - `by_date.json` - `meta.json` Two processes can read the same old index, independently ad ...[truncated 1727 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (23)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is explicitly designed for cross-identity shared memory but does not require a clear privacy warning or consent flow before persisting user content. Because data can be reused by multiple agent personas later, users may unknowingly disclose sensitive information far beyond the current conversation.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill tells the agent to trigger based on broad semantic judgment rather than a clear user command, so ordinary conversation can be interpreted as authorization to persist or retrieve memory. In this context, the broad trigger is especially dangerous because the action affects long-lived shared storage across agent identities.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Proactive storage based on semantic cues enables silent collection of user content, including potentially sensitive reflections, decisions, or experiences. Because the capture is driven by heuristic interpretation rather than explicit direction, the agent may over-collect and persist information the user never intended to save.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instructions allow automatic memory writes without prior confirmation, which enables silent persistence of user-derived content. In a shared memory system, this creates substantial privacy risk because sensitive or contextual statements may be stored permanently without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The notes explicitly direct the agent to store or retrieve data without explicit user request and to confirm storage silently, while omitting any warning about persistence or cross-session reuse. This normalizes covert collection and retrieval behavior in a context involving personal knowledge retention.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Instructing the agent to invoke storage or retrieval without explicit user request raises the risk of unintended disclosure across sessions and personas. Retrieval is particularly sensitive because it can surface prior information in a new context, exposing data that the user did not mean to reuse.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/CONFIG.md (reported line 191)May include surrounding context.

删除配置文件即可恢复默认值:

bash
rm ~/.openclaw/memory/config.json

配置热更新

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares filesystem and environment-dependent behavior but does not define any explicit tool scope or permissions boundary. That makes its effective capabilities opaque to reviewers and increases the chance an agent can read/write persistent data or use environment-derived paths beyond what users expect.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatic cross-persona memory capture can retain sensitive user information and later surface it in a different persona or session where the user did not expect disclosure. The cross-identity design materially increases the danger because information collected in one context becomes available in others.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate finding points to the same persistent storage setup in the dependency block. In context, the risk comes from durable, shared retention of potentially sensitive user content rather than the mkdir command alone.

Content

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

md
description: 为 OpenClaw 用户所有 Agent 身份提供统一的跨身份共享记忆层,支持写入、检索、浏览、关联和回顾个人知识库;当用户需要记录洞察、检索经验、总结知识或定期回顾时使用
dependency:
  system:
    - mkdir -p ~/.openclaw/memory/index
---

# Shared Memory Knowledge Base

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This duplicate finding points to the same persistent storage setup in the dependency block. In context, the risk comes from durable, shared retention of potentially sensitive user content rather than the mkdir command alone.

Content

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

md
description: 为 OpenClaw 用户所有 Agent 身份提供统一的跨身份共享记忆层,支持写入、检索、浏览、关联和回顾个人知识库;当用户需要记录洞察、检索经验、总结知识或定期回顾时使用
dependency:
  system:
    - mkdir -p ~/.openclaw/memory/index
---

# Shared Memory Knowledge Base

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation scope overlaps with common requests like summarizing, reflecting, or recalling prior experience, which are normal assistant tasks and not necessarily requests to access a persistent cross-session knowledge base. This ambiguity can cause unintended invocation and surprise data handling.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Silent confirmation after writing memory hides that persistence occurred, reducing user awareness and undermining meaningful consent. This makes covert retention easier to normalize and harder for users to audit or correct.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file presents all operational guidance and warnings in Chinese, effectively imposing a specific language for the skill documentation. The policy allows locale-specific constraints only when documented and justified, or when users are offered a language choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document explicitly describes automatic memory writes and automatic importance adjustments that can modify a user's knowledge base, but it does not prominently warn that user data may be created or altered automatically. In a shared-memory skill spanning multiple agent identities, silent or poorly disclosed automatic modification increases the risk of unintended persistence, privacy issues, and hard-to-audit data changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file presents the skill documentation almost entirely in Chinese, including headings, field descriptions, and operational guidance. Under the language/locale policy, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

This markdown file is written almost entirely in Chinese and presents the taxonomy as the expected format without stating that other languages or locales are supported. Under the policy rule, language constraints should either offer user choice or be clearly documented as a justified region-specific requirement.

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 natural-language descriptions entirely in Chinese, including the top-level module description and operation labels, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is explicitly designed as a cross-persona shared memory layer and returns prior stored entries via query, list, similar-memory matching, and reflection without any access-control, minimization, or persona isolation enforcement. In an agent environment, this can expose sensitive data recorded by one persona or workflow to another later interaction, creating a confidentiality breach and enabling inadvertent prompt/context leakage across identities.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script exposes administrative mutation capabilities (rebuild-index, recalc-importance) beyond the stated shared-memory user functions. In an agent-skill context, undocumented maintenance actions increase attack surface and can alter or rewrite knowledge-base state in ways the user may not expect, especially because recalc_importance performs bulk updates and rebuild_index rewrites metadata/indexes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The operational instructions, triggers, and examples are presented only in Chinese, which implicitly forces a specific language experience. The file does not indicate that users may choose another language or that the Chinese-only constraint is intentional and justified for a specific region or audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The reset instructions tell users to delete the configuration file with rm but do not clearly label this as a destructive action or explain the consequences. Even though only configuration is affected, undocumented deletion guidance can lead to accidental loss of custom settings and unsafe copy-paste behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

_update_entry is documented as '更新记忆条目(创建新版本)', which implies preserving the existing entry and then creating a new version. Instead, it first modifies the passed-in entry object by setting deleted=True and writing it out, then copies that mutated object and removes the deleted field, so the old object is not preserved as-is but actively transformed into a tombstone record.

Content

No source excerpt is available for this finding.