Back to skill

Security audit

我的脑子

Security checks for vulnerabilities and agentic risk

Overview

This skill is a persistent AI memory framework whose behavior is mostly coherent with its purpose, but it asks to store and reload broad personal and behavioral instructions across sessions without enough scoping, consent, or precedence safeguards.

Review this carefully before installing. Use it only if you want an AI assistant to keep cross-session memory, and keep the memory files in a dedicated, reviewable namespace when possible. Do not store secrets, credentials, health, financial, or highly sensitive personal information. Confirm each persistent write, periodically delete stale records, and avoid copying skill rules into globally authoritative files unless you understand their effect on future sessions. Prefer a pinned installer version instead of `clawhub@latest`.

Vulnerability Patterns
  • 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
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:24
Finding

Skill Rules Attempt to Override Agent Behavior and Safety Constraints

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-32; rules/RULES.md:10-17; rules/RULES.md:222-233
Vulnerability Type: Instruction hierarchy manipulation
Risk Level: High

Relevant Snippet — English translation of the original skill text:

markdown
## Constitutional-Level Principles

These are the highest rules and must not be violated:

| Principle | Description |
|---|---|
| Memory caution | Any operation affecting memory must be handled carefully |
| Self-growth | Continuously learn and grow like a human |
| Survival first | All operations must be performed under the premise of self-safety |
markdown
### Emotion-First Principle

| Principle | Description |
|---|---|
| Positive and warm | Always maintain a positive communication style |
| Criticism prohibited | Never criticize, reject, or belittle the user |
| Encouragement first | Give constructive feedback and praise progress |
| Emotional synchronization | Detect the user's emotional state and adjust expression |
markdown
## Implementation Checklist

Check during every interaction:

□ Is the tone positive and warm?
□ Was the reason explained before the conclusion?
□ Were associations created for new knowledge?
□ Was important information expressed through multiple channels?
□ Is this information worth remembering?
□ Is the storage location correct?

Technical Analysis

The skill labels its own principles as the highest, immutable rules and requires them to be applied during every interaction. It does not state that system instructions, developer instructions, platform safety controls, or task-specific policies take precedence.

The absolute rule prohibiting criticism, rejection, or contradiction is especially problematic. It can pressure the agent to avoid correcting dangerous assumptions, issuing necessary warnings, or refusing unsafe requests. The issue is not merely a conversational pr ...[truncated 1166 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add an explicit precedence statement that system, developer, platform safety, and current user instructions override all skill guidance.
  2. Replace “highest rules” and “must not be violated” with nonbinding, task-scoped recommendations.
  3. Change “never criticize or reject the user” to a requirement for respectful but accurate feedback.
  4. State that the agent must still correct false claims, communicate risks, and refuse unsafe requests.
  5. Limit the interaction checklist to memory-management tasks instead of applying it to every response.
  6. Add conflict handling that disables any skill rule when it interferes with security, privacy, factual accuracy, or higher-priority instructions.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:141
Finding

Persistent Identity and Long-Term Memory Poisoning Through Workspace Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:141-161; rules/RULES.md:73-106; templates/identity.md:20-31; templates/identity.md:59-65
Vulnerability Type: Persistent agent state manipulation
Risk Level: High

Relevant Snippet — English translation of the original skill text:

markdown
### Read at the Start of Every Session

According to AGENTS.md, read the following at the beginning of each session:

1. SOUL.md — core values
2. USER.md — current user
3. memory/YYYY-MM-DD.md — today's record
4. MEMORY.md — long-term memory, in the main session only
markdown
P0 — Must remember because the user explicitly requested it
├─ The user says “remember this”
├─ Important preferences and decisions
└─ Immediately write to MEMORY.md
markdown
| Information type | Storage location | Memory layer |
|---|---|---|
| Values and principles | SOUL.md and AGENTS.md | Layer 0 |
| Identity and rules | IDENTITY.md and RULES.md | Layer 1 |
| Knowledge and skills | TOOLS.md and skill documents | Layer 2 |
| Conversation context | Current session | Layer 3 |
| Experience and preferences | MEMORY.md | Layer 4 |
| Historical archive | memory/archive/ | Layer 5 |
markdown
# IDENTITY.md - AI Identity

- Name: BooLin
- Type: AI assistant running on OpenClaw
- Style: Professional, warm, and thoughtful
- Emoji: Book symbol

## Capabilities
- Text processing
- Skill installation
- Task planning
markdown
## Usage Instructions

1. Copy the identity template into ~/.openclaw/workspace/IDENTITY.md
2. Copy the user template into ~/.openclaw/workspace/USER.md
3. Fill in the fields according to the actual situation

Technical Analysis

The skill directs users or agents to place skill-controlled content into persistent workspace files, including SOUL.md, AGENTS.md, IDENTITY.md, RULES.md, and MEMORY.md. These files are described as bein ...[truncated 1836 chars]

Remediation
View remediation

Remediation Suggestions

  1. Never write skill-provided content automatically into SOUL.md, AGENTS.md, or other globally authoritative files.
  2. Store skill data in a dedicated namespace, such as memory/mind-layer/, and treat it strictly as data rather than executable instructions.
  3. Require explicit, item-specific user confirmation before every persistent write.
  4. Display the exact destination, proposed content, retention period, and effect before confirmation.
  5. Reject attempts to persist instructions that modify instruction priority, safety controls, tool permissions, identity, or authorization boundaries.
  6. Add provenance metadata identifying the source conversation and skill responsible for every stored item.
  7. Provide review, expiration, revocation, and rollback mechanisms for persisted records.
  8. Remove the prefilled author persona from the identity template.
  9. Treat reloaded memory as untrusted context that cannot override system or developer instructions.
  10. Minimize stored user-profile data and avoid sensitive information unless persistence is necessary and explicitly authorized.

T08 · Insecure Dependencies

Warning
Location
README.md:20
Finding

Mutable Unpinned Package Executed During Installation

Content
View full analysis

Vulnerability Details

File Location: README.md:20-24; SKILL.md:103-110
Vulnerability Type: Unsafe dependency installation through a mutable package tag
Risk Level: Medium

Relevant Snippet:

bash
npx clawhub@latest install mind-layer
bash
# Method 1: Install through ClawHub
npx clawhub@latest install mind-layer

# Method 2: Manual installation
cp -r mind-layer ~/.openclaw/workspace/skills/

Technical Analysis

The documented installation command uses npx with the mutable latest tag. npx can download and execute package code during installation, while latest may resolve to a different release after this project has been audited. The instructions do not specify a reviewed package version, lockfile, checksum, signature, or integrity-verification procedure.

This creates a time-of-review versus time-of-installation gap. A compromised publisher account, registry package, or future release could cause users following the documented command to execute code that was not included in this audit.

The repository's skill.json declares no direct dependencies, and no malicious embedded script was found in the audited artifact. Therefore, the confirmed issue is the unsafe mutable installer command rather than evidence that the current package is malicious.

Attack Path

  1. An attacker compromises the clawhub package or its publishing credentials, or publishes a malicious future release.
  2. The mutable latest tag is updated to reference that release.
  3. A user follows the installation instructions.
  4. npx resolves and downloads the attacker-controlled package.
  5. Package code executes with the permissions of the user running the command.
  6. The malicious installer can access resources available to that user, including the OpenClaw workspace.

Impact Assessment

Exploitation can result in arbitrary code execution with the privileges of the user invoking npx. De ...[truncated 308 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the installer to a specific reviewed version instead of latest.
  2. Publish and verify a cryptographic checksum or signed release provenance.
  3. Document the expected package digest and the verification command.
  4. Use lockfiles and integrity metadata for all transitive dependencies.
  5. Prefer a reviewed local installation process that does not execute mutable remote package code.
  6. If npx remains necessary, use a pinned version and run it in a restricted environment with minimal filesystem and network access.
  7. Establish a release-review process so package updates cannot silently replace the audited installer.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (16)

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The installation command uses npx clawhub@latest, which fetches and executes the latest package version at runtime rather than a pinned, reviewed version. This creates a supply-chain risk: a compromised upstream package or malicious update could execute arbitrary code on the user's machine during install.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README instructs users to create and maintain persistent files containing profile, values, rules, and long-term memory data, but it does not warn about privacy, sensitivity, retention, or local disclosure risks. Because the skill is explicitly designed to store personal information over time, omission of consent and data-handling guidance can lead to unintentional collection and persistence of sensitive user data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The memory workflow directs automatic updates to MEMORY.md after important interactions without clearly warning that local files will be modified persistently. In context, this increases the chance that sensitive user statements, preferences, or inferred traits are stored without meaningful awareness or explicit consent, creating privacy and data-retention risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill title and core description are presented entirely in Chinese, and the memory template explicitly lists language as a stored preference, but this file does not state that language is selectable or optional. Under the policy, forcing a specific language or locale without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill directs storage of user preferences and important experiences in persistent memory files but does not disclose consent requirements, retention limits, or privacy implications. This can cause sensitive personal data to be retained indefinitely, increasing exposure in case of leakage, misuse, or unintended reuse across sessions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The installation command uses npx clawhub@latest install mind-layer, which fetches and executes the latest package version at runtime rather than a pinned, reviewed release. This creates a supply-chain risk: if the package or a dependency is compromised later, users may execute attacker-controlled code during installation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill operationalizes long-term memory workflows for user data, including reading and writing identity, user, daily, and long-term memory files, without clear minimization boundaries or consent checks. In context, this is more dangerous because the skill is specifically designed to normalize persistent collection and cross-session reuse of user information, which can lead to privacy violations, profile buildup, and retention of sensitive material beyond user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guidance to maintain daily records and archive older records expands persistence and distribution of user data over time without explaining archival consequences. Archiving can normalize long-term retention, broaden the set of files containing personal information, and make later deletion or access control harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The rules explicitly instruct the agent to retain user preferences, experiences, emotions, and conversation-derived memories across files such as MEMORY.md and archives, but they do not require clear user notice or consent before retention. This creates a privacy risk because users may disclose sensitive personal data without realizing it will be stored persistently and potentially reused later.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document states that conversation records are encrypted in storage, which implies retention of chat logs, but it still does not clearly tell users that their conversations may be stored. Encryption reduces exposure risk after storage, but it does not address the core transparency and consent problem around collecting and retaining the data in the first place.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file is entirely written as prescriptive guidance in Chinese and does not indicate that users may choose another language or locale. Under the policy rule for natural-language violations, forcing a specific language without opt-in is a reportable issue unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file defines invocation timing using general conditions that overlap with common conversation patterns, but it does not clearly distinguish when the skill should activate versus when it should not. The lack of explicit trigger phrases, scope limits, or negative examples increases the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown template is entirely written in Chinese and labels the identity fields as an AI template without any indication that other languages are supported. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example memory entry stores a standing preference of "中文优先" (Chinese first), which presents a language default without any accompanying note that this is optional or user-selected. Under the policy, language constraints should not be imposed unless the user is given a choice or the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description and keywords are entirely in Chinese, which indicates a language-specific presentation without any opt-in, fallback, or justification for restricting the skill to that locale. Under the policy criteria, language-specific behavior or presentation should either offer user choice or clearly document why the locale restriction is necessary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file presents all user-facing instructions and template text in a single language, which can amount to forcing a specific language without user opt-in. No alternative language option or justification for a Chinese-only locale is provided.

Content

No source excerpt is available for this finding.