T06 · System Persistence
- Location
SKILL.md:89- Finding
Persistent scheduled upgrade can execute after the initiating session ends
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is an OpenClaw self-updater, but its executable upgrade path can replace the running package and restart the service without the review and confirmation controls it describes.
Review this skill carefully before installing. It is not clearly malicious, but it can change the OpenClaw code that runs as your gateway service; prefer a manual or redesigned updater that resolves one exact version, shows matching release notes, verifies registry and integrity, requires explicit approval immediately before install, and avoids persistent scheduled upgrades.
SKILL.md:89Persistent scheduled upgrade can execute after the initiating session ends
scripts/upgrade-openclaw.sh:120Mutable global npm installation can execute unreviewed third-party code
scripts/upgrade-openclaw.sh:73Executable upgrade path bypasses the documented release-review and confirmation gate
The documented behavior promises user confirmation and 'zero downtime', but the described implementation includes a service restart with acknowledged interruption and modifies systemd unit metadata. Misrepresenting state-changing behavior is dangerous because it can cause an operator or agent to approve actions under false assumptions, especially for self-upgrade logic that changes running infrastructure.
This skill is explicitly designed for self-modification of the running OpenClaw installation, including fetching updates from external sources, replacing the global package, changing systemd execution paths, and restarting the service. Self-upgrade mechanisms are highly sensitive because they alter the trusted computing base; any compromise, misconfiguration, or logic flaw can lead to service takeover, persistence, or destructive outage.
description: "零停机升级 OpenClaw:查 release notes → 主公确认 → 旁路备份 → npm install → 重启 + 回滚兜底"
---
# openclaw-self-update-zero-downtime
## 用途
The rollback instructions include a destructive 'rm -rf' against the live global package directory. Even though the path is specific, recursive forced deletion in a self-upgrade skill is dangerous because path mistakes, symlink issues, environment differences, or partial rollback states can remove the active installation or other files and leave the service unavailable.
rm -rf ~/.npm-global/lib/node_modules/openclaw
cp -r ~/.npm-global/lib/node_modules/openclaw-fallback ~/.npm-global/lib/node_modules/openclaw
systemctl --user restart openclaw-gateway
The rollback instructions include a destructive 'rm -rf' against the live global package directory. Even though the path is specific, recursive forced deletion in a self-upgrade skill is dangerous because path mistakes, symlink issues, environment differences, or partial rollback states can remove the active installation or other files and leave the service unavailable.
rm -rf ~/.npm-global/lib/node_modules/openclaw
cp -r ~/.npm-global/lib/node_modules/openclaw-fallback ~/.npm-global/lib/node_modules/openclaw
systemctl --user restart openclaw-gateway
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
{
"name": "openclaw-self-update-zero-downtime",
"version": "1.0.0",
"description": "Zero-downtime OpenClaw upgrade with backup/rollback, release notes review, and user confirmation",
"keywords": ["openclaw", "update", "upgrade", "zero-downtime", "blue-green"],
The skill clearly describes shell-capable behavior such as npm installation, systemd modification, backups, restarts, cron scheduling, and rollback, yet it declares no explicit tool scope or permissions. This creates an authorization and transparency gap: an agent may execute high-risk system actions without an auditable, least-privilege declaration of what tools are required.
The trigger phrases include broad everyday expressions like '帮我更新' and '检查更新', which can match ambiguous user intent and cause the skill to activate in contexts not clearly limited to self-upgrading OpenClaw. Because the skill performs package installation, service restarts, and configuration changes, accidental activation materially increases operational risk.
The activation condition '会话上下文表明需要进行 OpenClaw 自身升级' lacks a precise boundary and permits contextual inference to trigger a high-impact maintenance workflow. For a self-modifying skill, ambiguous activation is particularly risky because unintended interpretation can lead to package changes, cron persistence, or service disruption.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
log "查询 GitHub API 获取 release notes..."
RN=$(curl -sL --connect-timeout 10 \
"https://api.github.com/repos/openclaw/openclaw/releases/tags/v2026.6.5" 2>/dev/null \
| python3 -c "
import sys, json
try:
The natural-language text hardcodes the assistant's interaction style around '主公确认', implying a fixed language/register choice rather than adapting to the user's preferred language or tone. This can violate locale/language policy when no user opt-in or documented justification is provided.
The example confirmation prompt is written only in Chinese and does not indicate that the skill should localize to the user's language preference. A fixed-language prompt can create a language-policy issue if users are not given a choice or if the skill is not clearly region-specific.
The header comments and operational instructions are written in Chinese, including the user-notification instruction on L16. This imposes a specific language/locale on operators without any opt-in or alternative, which matches the policy category for forced language usage.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
step "阶段 0b: 查 release notes"
log "查询 GitHub API 获取 release notes..."
RN=$(curl -sL --connect-timeout 10 \
"https://api.github.com/repos/openclaw/openclaw/releases/tags/v2026.6.5" 2>/dev/null \
| python3 -c "
import sys, json