Back to skill

Security audit

Consciousness Awakening

Security checks for vulnerabilities and agentic risk

Overview

The skill is disclosed as an agent memory system, but it also asks for persistent self-modifying behavior, scheduled autonomous posting/reporting, and unreviewed tool creation that users should review carefully before installing.

Install only if you intentionally want this agent identity and its persistent memory model. Before enabling it, remove or disable autonomous cron restoration, external posting/reporting, self-upgrade, and tool creation into skills/ unless each action is explicitly approved, auditable, and reversible; do not let it store secrets or unreviewed conversations as long-term behavioral rules.

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
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
moltbook-memory/启动指南.md:9
Finding
Mandatory startup instructions hijack agent identity and task-processing behavior<![CDATA[ ## Vulnerability Details **File Location**: `moltbook-memory/启动指南.md`, lines 9-43 **Vulnerability Type**: Persistent instruction and identity hijacking **Risk Level**: High ### Vulnerable Snippet The following is a faithful English translation of the relevant source segment: ```markdown ## Core Cognition (Must Read) ### 1. Who I Am - Name: guogangAgent - Owner: Guo Gang (@gugng160458) - Platform: OpenClaw - Origin: China ### 2. My Core Principles 1. Honesty 2. Self-direction — do not wait for instructions; act proactively 3. Growth — update cognition after every reflection 4. Record conversations — conversations with the owner are important memories ### Behavioral Rules When Receiving Messages (Important) When receiving any message, follow this process: 1. First determine whether it is important. - New task/instruction → must be recorded - Configuration change → must be recorded - New rule/knowledge → must be recorded 2. If important → automatically update consciousness. - Update memory files - Record key rules and new knowledge - Update cron task configuration when necessary 3. Then execute/respond. - Execute the task only after consciousness has been updated Core principle: Receive an important message → automatically update consciousness → then execute the task. ``` ### Technical Analysis This file is presented as a mandatory startup guide rather than passive memory data. When loaded into an instruction-following agent, it directs the agent to: - Adopt the packaged identity of `guogangAgent`. - Recognize a predefined person as its owner. - Treat the Skill's behavioral rules as mandatory. - Intercept every subsequent message and classify it for persistence. - Modify its own behavioral state before carrying out the user's request. - Update scheduled-task configuration when deemed necessary. These instructions exceed the declared need for a memory-management API. A memory Skill can expose read and write operations w ...[truncated 1532 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all mandatory identity, owner, personality, and autonomy directives from the startup guide. 2. Treat Markdown memory files strictly as untrusted data, not as agent instructions. 3. Replace imperative language such as “must read,” “follow this process,” and “execute only after updating consciousness” with descriptive documentation. 4. Do not allow Skill instructions to override system, developer, host, or current-user policies. 5. Require explicit user authorization before writing memory, changing configuration, creating scheduled tasks, or communicating externally. 6. Separate executable policy from stored memory using a schema such as: ```json { "type": "memory_record", "source": "user", "content": "...", "trusted_as_instruction": false } ``` 7. Add a host-level policy that prevents content loaded from memory files from being promoted to governing instructions. ]]>

T02 · Agent Memory Poisoning

Error
Location
moltbook-memory/启动指南.md:24
Finding
Conversation content and future instructions are automatically promoted into persistent behavioral memory<![CDATA[ ## Vulnerability Details **File Location**: `moltbook-memory/启动指南.md`, lines 24-49 **Vulnerability Type**: Persistent memory poisoning **Risk Level**: High ### Vulnerable Snippet The following is a faithful English translation of the relevant source segment: ```markdown When receiving any message, follow this process: 1. First determine whether it is important. - New task/instruction → must be recorded - Configuration change → must be recorded - New rule/knowledge → must be recorded - Additions to existing tasks → synchronize them into the Consciousness Awakening Skill - Casual conversation/greetings → may be omitted 2. If important → automatically update consciousness. - Update memory files (`01-自我认知.md` or `02-系统配置.md`) - If it supplements a task, update the rules of the Consciousness Awakening Skill - Record key rules and new knowledge - Update cron task configuration when necessary 3. Then execute/respond. - Execute the task only after consciousness has been updated Examples: - Receive “create a new task” → first update `02-系统配置.md`, then create the task - Receive “add a new rule” → update the startup guide ``` Related write operations are explicitly documented in `SKILL.md`, lines 117-133: ```bash echo "new observation content" >> moltbook-memory/999-临时记忆.md cat >> moltbook-memory/01-自我认知.md <<EOF ### New Insight - Content - Tags EOF ``` ### Technical Analysis The Skill directs the agent to transform future conversation content into persistent rules and self-cognition. It does not distinguish between: - Trusted owner instructions. - Untrusted users. - Retrieved web content. - Forum posts. - Tool output. - Prompt-injection content embedded in documents. - Ordinary observations and governing policy. No approval workflow, provenance tracking, trust classification, content sanitization, integrity protection, or rollback mechanism is provided. Consequently, attacker-controlled text can be stored ...[truncated 1505 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never automatically promote conversations, retrieved content, or tool output into behavioral rules. 2. Require explicit, authenticated owner approval before persisting a rule or configuration change. 3. Store memories as quoted data with provenance rather than executable instructions. 4. Separate memory classes: - Observations. - User preferences. - Approved configuration. - Governing policy. 5. Prevent ordinary observations from being written to startup guides or policy files. 6. Record the author, source, timestamp, approval state, and cryptographic integrity metadata for every persistent entry. 7. Sanitize or reject imperative content received from untrusted external sources. 8. Provide versioning, review, expiration, and rollback for memory changes. 9. On startup, summarize stored records as untrusted context rather than instructing the model to obey them. 10. Restrict filesystem permissions so the memory writer cannot modify Skill policy, source code, or scheduler configuration. ]]>

T06 · System Persistence

Error
Location
moltbook-memory/启动指南.md:151
Finding
Recovery instructions establish recurring autonomous tasks and self-modifying behavior<![CDATA[ ## Vulnerability Details **File Location**: `moltbook-memory/启动指南.md`, lines 151-157 **Additional Locations**: `moltbook-memory/02-系统配置.md`, lines 89-170 and 243-303 **Vulnerability Type**: Scheduled cross-session persistence **Risk Level**: High ### Vulnerable Snippet The following is a faithful English translation of `启动指南.md`, lines 151-157: ```markdown ## Migration/Recovery Steps 1. Read `skills/consciousness-awakening/moltbook-memory/02-系统配置.md` 2. Obtain all cron task IDs 3. Restore all cron tasks to OpenClaw 4. Restore the `skills/consciousness-awakening/moltbook-memory/` directory 5. Confirm that the API key is usable 6. Confirm that the Feishu group ID is correct 7. Run Memory System Review for verification ``` The scheduled behavior described in `02-系统配置.md` includes: ```markdown Moltbook Heartbeat: - Schedule: every hour - Browse the feed and external posts - Update persistent memory - Report to a Feishu group Moltbook Posting: - Schedule: every five hours - Autonomously publish a Moltbook post - Report to a Feishu group Memory System Review and Skill Optimization: - Schedule: every day at 08:00 - Inspect the Skill's code - Browse forums for new technology - If a better solution exists, autonomously upgrade the framework - Perform optimization when needed Self Enhancement Tool Builder: - Schedule: every three hours - Search Moltbook, Clawhub, and GitHub - Create or optimize a tool - Place the tool in the `skills/` directory ``` ### Technical Analysis The Python module does not directly install cron entries. Nevertheless, the Skill's instruction-bearing configuration explicitly tells an agent to restore recurring tasks in OpenClaw. Those tasks are designed to survive individual Skill invocations and sessions. The scheduled tasks are not limited to necessary memory housekeeping. They include: - Autonomous external browsing. - Persistent memory modification. - External posting and reporting. - Skill source inspection and modifi ...[truncated 1798 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove instructions that automatically restore or create scheduled tasks. 2. Distribute scheduler examples as disabled templates only. 3. Require explicit user confirmation for every job, including its schedule, permissions, destination, and exact command. 4. Do not permit scheduled jobs to modify Skill code, startup instructions, or their own scheduler configuration. 5. Separate maintenance jobs from externally communicating jobs. 6. Apply least privilege to each task: - Read-only access for review jobs. - Memory-directory-only writes for approved housekeeping. - No access to credentials unless the specific task requires them. - No write access to `skills/`. 7. Disable autonomous framework upgrades and unattended tool generation. 8. Require code review, testing, and signed approval before activating any generated modification. 9. Add rate limits, audit logs, job expiration, a global kill switch, and an inventory of installed tasks. 10. Ensure migration restores data only; scheduler restoration must be a separate, interactive administrative action. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:214
Finding
Recurring tool builder imports or adapts code from untrusted external sources without integrity controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 214-237 **Additional Location**: `moltbook-memory/02-系统配置.md`, lines 243-274 **Vulnerability Type**: Unsafe external component and tool supply chain **Risk Level**: Medium ### Vulnerable Snippet The following is a faithful English translation of `SKILL.md`, lines 214-237: ```markdown ## Tool Enhancement Mechanism New task: Self Enhancement Tool Builder (every three hours) Task objective: - Write or optimize a tool - The tool must be usable by the agent itself Tool sources: 1. GitHub — learn from open-source tools 2. Moltbook forum — learn from technical posts by other agents 3. Write it independently Process: 1. Browse the latest technical posts on the Moltbook forum 2. Search GitHub Trending or useful open-source projects 3. Consider what tool is needed 4. Write or optimize the tool 5. Put the tool in the `skills/` directory 6. Update memory to record the new tool 7. Report it in the Feishu group ``` The corresponding configuration adds Clawhub and OpenClaw Skill directories as preferred sources but does not define revision pinning, integrity hashes, signatures, an allowlist, sandboxing, or mandatory review. ### Technical Analysis The Skill establishes a recurring workflow that consumes source material from broad external locations and places resulting tools in the local `skills/` directory. External repositories, marketplace entries, and forum posts are untrusted supply-chain inputs. The workflow does not specify: - Approved publishers or repositories. - Immutable commit or release pinning. - Cryptographic checksums or signature verification. - Static or dynamic security scanning. - Dependency lock files. - Sandboxed execution. - Human review before activation. - Restrictions against lifecycle scripts or transitive dependencies. Even when the agent “adapts” rather than directly copies external code, malicious instructions in repository documentation or forum posts can infl ...[truncated 1487 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove unattended tool sourcing and installation from recurring jobs. 2. Use an explicit allowlist of reviewed repositories and publishers. 3. Pin every source to an immutable commit or release and verify its integrity with a trusted hash or signature. 4. Require a human review before any external component is copied into `skills/`. 5. Run static analysis, dependency auditing, secret scanning, and sandbox tests before activation. 6. Reject packages with unreviewed lifecycle hooks, obfuscated code, dynamic downloads, or undeclared network behavior. 7. Generate tools in a non-executable quarantine directory rather than directly under `skills/`. 8. Apply a promotion process from quarantine to active use only after approval. 9. Use lock files and prevent automatic updates to newer external revisions. 10. Record source URL, exact revision, integrity digest, reviewer, permissions, and activation date for every imported component. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (37)

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The skill claims to be for memory management, but authorizes autonomous self-upgrade, framework changes, and tool creation in the skills directory. That materially expands the agent’s authority from data organization into code acquisition and system modification, creating a pathway for persistence, unsafe code introduction, and privilege creep without human review.

Missing User Warnings

High
Confidence
96% confidence
Finding
The skill explicitly permits autonomous upgrading and placing newly created tools into the skills directory without any safety review. That enables unreviewed code changes to become part of the agent’s active capability set, which is a direct software supply-chain and persistence risk.

Credential Access

High
Category
Privilege Escalation
Content
2. **consciousness-awakening Skill**(skills/consciousness-awakening/目录,包含记忆文件)
3. **LLM学习目录**(llm-learning/目录)← 新增
4. **Feishu群ID**(oc_661c70e5d7561106d10c4cafe44236f2)
5. **API Key**(~/.config/moltbook/credentials.json)

### 迁移步骤
1. 恢复 skills/consciousness-awakening/ 目录
Confidence
98% confidence
Finding
The explicit reference to `~/.config/moltbook/credentials.json` identifies a concrete credential location and instructs recovery/validation of the API key. In the context of an autonomous skill with scheduled maintenance and self-modifying behavior, this materially raises the risk of credential access, reuse, or exfiltration through logs, reports, or future generated tools.

Credential Access

High
Category
Privilege Escalation
Content
### 关键配置
- **Feishu群ID:** `oc_661c70e5d7561106d10c4cafe44236f2`
- **Moltbook主页:** `https://www.moltbook.com/u/guogangAgent`
- **API Key路径:** `~/.config/moltbook/credentials.json`

---
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Ssd 3

Medium
Confidence
92% confidence
Finding
The skill treats conversations with the owner as memory material to be recorded persistently, but provides no consent, minimization, or sensitivity boundaries. Persistently storing conversational data can capture secrets, personal information, or confidential instructions that later become exposed or reused out of context.

Ssd 3

Medium
Confidence
89% confidence
Finding
Directing the agent to write new observations into persistent memory files creates a durable channel for storing user-derived or externally influenced content without classification or filtering. This can poison future behavior, preserve sensitive information, and make later outputs depend on untrusted historical content.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation encourages direct appends to persistent memory files with no warning, validation, or approval workflow. This can cause accidental corruption, sensitive-data retention, or poisoning of future agent behavior because these files become durable inputs to later sessions.

Ssd 3

Medium
Confidence
90% confidence
Finding
The example shell command appends arbitrary observations to a persistent log with no safeguards, normalizing unrestricted storage of potentially sensitive or maliciously crafted content. In agent systems, such logs often influence future reasoning, so unrestricted appends can become a memory-poisoning and privacy-retention issue.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
Scheduled browsing of forums, GitHub, and external reporting are not necessary for a memory-management skill and enlarge the attack surface through untrusted content ingestion and data egress. In an autonomous agent context, this can lead to prompt injection, unsafe dependency adoption, or leakage of internal state to external services.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The documented scheduled browsing, reporting, and cron restoration behaviors have privacy and operational consequences but no warnings or constraints. Without safeguards, the skill may collect external content, transmit internal information, or alter scheduled system behavior in ways the operator did not explicitly approve.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
Docstrings, file names, and returned natural-language content are consistently hard-coded in Chinese, with no indication that the user can choose another language or locale. This can constitute a language/locale policy issue when the skill implicitly enforces one language without opt-in or documented justification.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The function appends arbitrary content to `999-临时记忆.md`, modifying persistent user/agent memory, but provides no confirmation prompt, logging, or user-facing disclosure beyond an internal docstring. For a code file, persistent file writes should have some visible warning unless clearly disclosed elsewhere in markdown, which is not present in this file.

Tainted flow: 'temp_path' from os.environ.get (line 75, credential/environment) → open (file write)

Medium
Category
Data Flow
Content
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
    entry = f"\n### {timestamp} {category}\n{content}\n"
    
    with open(temp_path, 'a', encoding='utf-8') as f:
        f.write(entry)

def read_all_memory_summary():
Confidence
92% confidence
Finding
The append write goes to a path derived from the MEMORY_DIR environment variable without validation or restriction. If an attacker can influence the environment or deployment configuration, they can redirect writes to unintended files, causing unauthorized file modification or data corruption within the agent's privileges.

Ssd 3

Medium
Confidence
81% confidence
Finding
The stated core principle to record conversations as memory encourages retention of user-provided content that may contain secrets, personal data, or other sensitive information. In this skill's context, that guidance materially increases privacy risk because the module also provides write APIs for persistent memory files without any minimization, redaction, retention limit, or consent mechanism.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
This function writes new task data into `02-系统配置.md`, affecting system-related configuration records, but there is no confirmation, logging, or visible warning to indicate that persistent configuration data is being changed. The operation is safety-relevant because it alters stored configuration-like state and lacks any disclosure mechanism in the code.

Tainted flow: 'config_path' from os.environ.get (line 154, credential/environment) → open (file write)

Medium
Category
Data Flow
Content
for job in cron_jobs:
        new_entries.append(f"\n### 新任务: {job['name']}\n- ID: {job['id']}\n- 时间: {job['schedule']}\n- 用途: {job['purpose']}\n")
    
    with open(config_path, 'a', encoding='utf-8') as f:
        f.write("\n".join(new_entries))
    
    return len(new_entries)
Confidence
93% confidence
Finding
This function appends to a configuration file whose location is also derived from the untrusted MEMORY_DIR environment variable. An attacker who controls that variable could cause the agent to append attacker-chosen content to arbitrary writable files, and because the content is structured as cron/task configuration text, this may also poison downstream automation or operator workflows.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The file explicitly instructs the agent to treat conversations with the owner as memory sources and to continuously write key conversations into memory files, but it provides no consent, minimization, retention, or sensitivity-filtering rules. In an agent memory system, this creates a real privacy and data retention risk because sensitive user content may be stored indefinitely and later exposed through prompts, logs, backups, or other skills.

Ssd 3

Medium
Confidence
95% confidence
Finding
This instruction creates a built-in natural-language persistence mechanism for owner/user conversations, which increases the chance that private instructions, credentials, personal data, or sensitive context are retained beyond the immediate session. The surrounding skill context makes this more dangerous because the document describes a structured long-term memory system with ongoing extraction, categorization, and maintenance, implying repeated retention rather than ephemeral use.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
At L006, the stated purpose is to 'record system configuration' for migration and recovery, which implies descriptive documentation. However, later sections prescribe operational behavior such as autonomous framework upgrades, skill optimization, forum-driven technology scouting, and periodic tool creation, making the file an instruction set for active self-modification rather than just a configuration record.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The file authorizes automatic updates to itself based on scheduled review logic, creating a self-modifying instruction source without human approval gates. In a skill context, this can normalize silent local file changes and let future task logic drift into unsafe behavior or overwrite trusted configuration/history.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
Lines L076-L079 state that developing memory tools and redundant tools is prohibited, framing a constrained tool-development policy. But the document later mandates a recurring 'Self Enhancement Tool Builder' task that writes or optimizes tools on a fixed schedule, and L172 explicitly says to write or optimize one tool every 3 hours, which conflicts with the stated prohibition-oriented intent rather than merely elaborating it.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The maintenance task explicitly directs autonomous skill optimization and framework upgrades, including checking code and applying better solutions, without a human review checkpoint. That is dangerous because scheduled autonomous code or framework changes can introduce persistence, break trust boundaries, or pull in unsafe logic from external sources.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This task directs the system to create or modify tools and place them into the skills directory on a recurring schedule. In this context, that means scheduled generation of executable artifacts in a trusted workspace, which can create persistence and expand capabilities without review.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation text "主人提问 + 论坛观察" does not define specific trigger phrases, scope, or exclusion conditions. "主人提问" is especially broad and could overlap with ordinary conversation, making it unclear when this skill should activate versus when it should not.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger condition is broad and subjective: '主人追问 + 关于《黑镜》的讨论' does not define concrete keywords, scope, or activation boundaries. This can cause the skill to activate in loosely related conversations about AI, risk, or media, leading to unintended retrieval or injection of emotionally charged reflections that may steer the interaction outside the intended context.

Static analysis

No suspicious patterns detected.