Back to skill

Security audit

Self Update Zero Downtime

Security checks for vulnerabilities and agentic risk

Overview

The skill is rated suspicious because scanners report upgrade and rollback steps that can delete or replace files before they are safely validated or approved.

Consider the reported deletion, rollback, and confirmation risks before installing. The scanner run is marked partial because some local references could not be resolved, so its evidence is incomplete; the suspicious verdict is a reason to review carefully before proceeding.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upgrade-openclaw.sh
Finding

Upgrade script bypasses the documented confirmation gate

Content
View full analysis

Impact

Direct invocation can overwrite the installation and restart the service before approval of the target version and breaking changes. The unversioned install command also does not bind installation to a previously reviewed version.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

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

md
# self-update-zero-downtime

## 用途

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

The rollback instructions delete the installed application before successfully restoring the backup. Earlier existence and backup checks reduce risk, but a missing, unreadable, or damaged backup—or a failed copy—can still leave the application unavailable because restoration is not staged before deletion.

Content

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

md
# 2. 恢复
BK=$HOME/.openclaw/backups/openclaw-<版本>-<时间戳>
rm -rf "$(npm root -g)/openclaw"
cp -a "$BK" "$(npm root -g)/openclaw"

# 3. 重启+验证

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

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

安装

bash
clawhub install self-update-zero-downtime

变更日志

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

Scanner excerpt · _meta.json (reported line 3)May include surrounding context.

json
{
  "ownerId": "kn7079dabhmak2gsgf375raq3n88ccyz",
  "slug": "self-update-zero-downtime",
  "version": "1.1.0",
  "publishedAt": 1781061241380
}

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

Scanner excerpt · package.json (reported line 2)May include surrounding context.

json
{
  "name": "self-update-zero-downtime",
  "version": "1.1.0",
  "description": "Zero-downtime OpenClaw upgrade with backup/rollback, release notes check, user confirmation. Auto-detects install type (npm vs git), path consistency check, prefix writability check.",
  "keywords": ["openclaw", "update", "upgrade", "zero-downtime", "blue-green"],

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

This branch recursively deletes the contents of a dynamically discovered directory before copying and validating its replacement. Earlier checks normally reject mismatched installations, reducing reachability, but they do not enforce a canonical installation boundary in every path—for example, when the initial npm-global directory is absent—so incorrect discovery or copy failure can cause data loss and extended downtime.

Content

Scanner excerpt · scripts/upgrade-openclaw.sh (reported line 305)May include surrounding context.

sh
# 需要把新代码同步到 RUN_DIR
if [ "$(cd "$RUN_DIR" && pwd)" != "$(cd "$ACTUAL_DIR" && pwd)" ]; then
    log "npm 更新了 $ACTUAL_DIR,但进程跑的是 $RUN_DIR,需同步..."
    rm -rf "$RUN_DIR"/*
    cp -r "$ACTUAL_DIR"/* "$RUN_DIR/"
    ok "已同步到 $RUN_DIR"
fi

MCP server referenced without pinned version: 'npx semver'.

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The optional npx semver fallback can download and execute an unpinned package with the agent's user privileges. Although this is a normal npm utility rather than an MCP server, resolving executable code dynamically creates avoidable supply-chain exposure during an upgrade procedure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/upgrade-openclaw.sh (reported line 217)May include surrounding context.

sh
exit 0
else
    RN=$(curl -sL --connect-timeout 10 \
        "https://api.github.com/repos/openclaw/openclaw/releases/tags/v${TARGET_VERSION}" 2>/dev/null \
        | python3 -c "
import sys, json
try:

L003 describes a zero-downtime upgrade, but L338 restarts the running service, interrupting availability.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The header at L003 explicitly calls this a zero-downtime upgrade script. However, L338 uses systemctl restart, stopping the existing service before starting its replacement, with no rolling deployment or traffic handover; L352 even acknowledges a brief interruption.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
15% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/upgrade-openclaw.sh (reported line 216)May include surrounding context.

sh
ok "无需升级,退出"
    exit 0
else
    RN=$(curl -sL --connect-timeout 10 \
        "https://api.github.com/repos/openclaw/openclaw/releases/tags/v${TARGET_VERSION}" 2>/dev/null \
        | python3 -c "
import sys, json