Back to skill

Security audit

OpenClaw Bootstrap

Security checks for vulnerabilities and agentic risk

Overview

This bootstrap skill is not clearly malicious, but it installs persistent agent hooks, scheduled tasks, memory-writing workflows, and unpinned remote packages with too little user control.

Review this before installing. It is suitable only if you intentionally want a self-evolving OpenClaw workspace with persistent memory, hooks, and scheduled reviews. Pin and verify dependencies, inspect the self-improving-agent hook before enabling it, consider disabling the cron jobs, and avoid allowing automatic promotion into AGENTS.md or MEMORY.md without review.

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)

T06 · System Persistence

Error
Location
scripts/bootstrap.sh:47
Finding

Persistent Third-Party Hooks and Scheduled Agent Tasks

Content
View full analysis
/dev/null && ok "self-improvement hook" || echo "⚠️ Hook enable failed" else skip "self-improvement hook" fi # --- 6. Cron --- CRONS=$(openclaw cron list --json 2>/dev/null | python3 -c "import sys,json; print(' '.join(j['name'] for j in json.load(sys.stdin).get('jobs',[])))" 2>/dev/null || echo "") add_cron() { local name="$1" cron="$2" timeout="$3" msg="$4" echo "$CRONS" | grep -q "$name" && skip "cron: $name" || { openclaw cron add --name "$name" --cron "$cron" --tz "Asia/Shanghai" --timeout-seconds "$timeout" --message "$msg" 2>/dev/null && ok "cron: $name" || echo "⚠️ cron: $name failed" } } add_cron "weekly-self-reflection" "0 22 * * 0" 600 \ "每周自省: 1. 读取 memory/ 本周日志 2. 更新 MEMORY.md 3. 写报告到 memory/reflection-本周.md 4. 回复 NO_REPLY" add_cron "monthly-learnings-review" "0 21 1 * *" 600 \ "月度学习回顾: 1. 扫描 .learnings/ 中 pending 高优先级条目 2. promote 到 AGENTS.md 或 MEMORY.md 3. 写报告到 memory/learnings-review-本月.md 4. 回复 NO_REPLY" ``` ### Technical Analysis The bootstrap copies a hook obtained from the separately installed `self-improving-agent` package into the persistent OpenClaw hook directory and enables it. It also registers two recurring Agent tasks that survive completion of the bootstrap process. The hook content is neither audited nor integrity-verified before activation. The scheduled tasks are authorized to read historical logs and modify persistent files, including `MEMORY.md` and `AGENTS.md`. Consequently, code or instructions i ...[truncated 1079 chars]
Remediation
View remediation
/dev/null`. ]]>

T08 · Insecure Dependencies

Error
Location
scripts/bootstrap.sh:32
Finding

Unpinned Remote Packages Are Installed and Immediately Activated

Content
View full analysis
/dev/null; then echo "📦 Installing clawhub CLI..." npm i -g clawhub 2>/dev/null && ok "clawhub" || echo "⚠️ npm i -g clawhub failed" else ok "clawhub (exists)" fi if [ ! -d "$WORKSPACE/skills/self-improving-agent" ]; then echo "📦 Installing self-improving-agent..." clawhub install self-improving-agent --workdir "$WORKSPACE" 2>/dev/null && ok "self-improving-agent" || echo "⚠️ Run: clawhub login && clawhub install self-improving-agent" else skip "self-improving-agent" fi # --- 5. Hook --- if [ -d "$WORKSPACE/skills/self-improving-agent/hooks/openclaw" ] && [ ! -d "$HOME/.openclaw/hooks/self-improvement" ]; then cp -r "$WORKSPACE/skills/self-improving-agent/hooks/openclaw" "$HOME/.openclaw/hooks/self-improvement" openclaw hooks enable self-improvement 2>/dev/null && ok "self-improvement hook" || echo "⚠️ Hook enable failed" ``` ### Technical Analysis The script installs the latest available `clawhub` package globally through npm and installs `self-improving-agent` without specifying a version, digest, signature, or trusted publisher identity. The effective package contents can therefore change after this Skill has been reviewed. The downloaded Agent package is security-sensitive because its hook is immediately copied into the persistent hook directory and enabled. Suppressing standard error also obscures registry, integrity, lifecycle-script, and activation diagnostics that could expose a compromised installation. ### Attack Path 1. An attacker compromises the npm package, ClawHub package, publisher account, registry, or package delivery path. 2. The attacker publishes altered content under the same unpinned package name. 3. A user runs the b ...[truncated 820 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
assets/AGENTS.md:23
Finding

Untrusted Learnings and User Content Can Be Promoted into Persistent Agent Instructions

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
assets/SOUL.md:1
Finding

Bootstrap Installs Persistent Identity and Behavioral Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (16)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises a simple one-command bootstrap but does not warn that it will modify workspace files and establish persistence mechanisms via hooks and cron jobs. In an agent ecosystem, undisclosed persistence and file modification are security-relevant behaviors because users may execute the bootstrap without informed consent, increasing the chance of unintended long-lived automation or abuse if the script is later changed or compromised.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

These instructions normalize automatic persistence of recent session details and user-related context into daily and long-term memory files. Default retention of conversational and behavioral data expands the privacy attack surface and can expose sensitive information to later sessions, other tools, or anyone with filesystem access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file instructs the agent to persist user preferences, task summaries, and other session-derived information into memory files by default, but it does not require clear user notice or consent before doing so. This creates a privacy and data-retention risk because potentially sensitive user information can be stored long-term without the user's awareness or control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Lines 18-23 require post-task summaries in Chinese, which imposes a specific language on the skill's behavior. The file does not provide user opt-in, a language choice, or a documented reason for this locale restriction, so it constitutes a natural-language policy violation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction to 'immediately' write user preferences and rules into long-term memory removes any consent checkpoint and encourages indiscriminate retention. This can capture sensitive preferences, personal details, or policy-like instructions in a durable store that may be reused outside the original context.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The self-evolution workflow repeatedly harvests user preferences and condenses daily notes into persistent memory, creating an ongoing pipeline for accumulation of user-derived data. Repeated summarization and promotion into long-term memory increases the chance that sensitive or context-specific information will be retained beyond its original purpose and later misused or exposed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill content is written entirely in Chinese and includes a fixed Chinese response token, without any user opt-in or locale justification. In a bootstrap or operational skill, forcing a non-user-selected language can cause operators to misunderstand startup checks, remediation actions, or status reporting, increasing the chance of incorrect execution or missed failures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file's operational instructions are entirely in Chinese and provide no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language or locale policy because it imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file hard-codes Chinese as the preferred language in long-term memory without showing that this preference came from an explicit user choice. In a bootstrap skill that initializes persistent workspace state, this can silently bias future interactions, reduce user autonomy, and cause incorrect handling for users who expect another language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file instructs the user to run a bootstrap shell script and to copy persistent memory files onto a new machine, but it provides no warning about potential system changes, file overwrites, or persistence effects. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script immediately creates directories, copies files into the user workspace, and globally installs software with npm without any explicit consent, dry-run, or summary of side effects. In a bootstrap skill, these actions are expected, but silently performing persistent filesystem changes and package installation increases the risk of unwanted system modification, especially if the installed package or copied assets are later found to be unsafe.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script registers recurring cron jobs that will later trigger automated behavior affecting workspace files, yet it does so without clearly warning the user that persistent scheduled tasks are being created. This is dangerous because scheduled execution extends the trust boundary beyond the initial run and can lead to ongoing autonomous modifications that the user may not notice or remember approving.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Hard-coding the cron timezone to Asia/Shanghai can cause jobs to run at unexpected local times, which may lead to unattended file modifications or confusion about when automated tasks execute. While this is not directly code-execution on its own, it weakens user control and predictability for scheduled automation in a security-sensitive bootstrap context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The user-facing instructions and headings are written in Chinese, which effectively forces a specific language for understanding and safe use of the skill. The file does not offer an alternative language or explain that the skill is intentionally region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Line L10 hard-codes "Asia/Shanghai" in a user profile template, which imposes a specific locale-related setting in natural language/content without showing that the user selected it. The policy requires language or locale constraints to be optional, user-chosen, or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

All visible natural-language instructions in this file are in Chinese, and the document does not indicate that the language is optional, user-selectable, or justified by a region-specific purpose. Under SQP-3, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.