safe-update

ReviewAudited by ClawScan on May 10, 2026.

Overview

This updater mostly matches its purpose, but review it first because some safety promises are inconsistent: dry-run can still change git settings, and the script restarts the service automatically.

Review the script before running it. Be aware that it can modify your OpenClaw source tree, globally install OpenClaw, restart the gateway, and copy auth profiles into backups. Do not rely on the current dry-run mode as completely non-mutating unless the unconditional `git remote add upstream` behavior is fixed.

Findings (5)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

A user who runs dry-run expecting a preview-only operation may still have their local repository configuration changed.

Why it was flagged

The script tells the user dry-run makes no changes, but `git remote add upstream` is executed outside the dry-run wrapper, so dry-run can still persistently modify the repository's git configuration.

Skill content
log_warn "DRY-RUN MODE: No actual changes will be made" ... git remote add upstream https://github.com/openclaw/openclaw.git 2>/dev/null || true
Recommendation

Wrap the `git remote add upstream` command in the dry-run-aware command runner, or skip it entirely when `DRY_RUN=true`.

What this means

Running the script can change the local source tree, replace the globally installed OpenClaw version, and interrupt the running gateway service.

Why it was flagged

The script performs high-impact local update operations: it changes the git checkout, builds source, globally installs the package, and restarts the OpenClaw gateway. These actions fit the updater purpose but deserve explicit user awareness.

Skill content
run_cmd git merge "upstream/$BRANCH" ... run_cmd npm run build ... run_cmd npm i -g . ... run_cmd systemctl --user restart openclaw-gateway
Recommendation

Run it only after reviewing local changes, preferably try `--dry-run` after the dry-run bug is fixed, and make sure you are comfortable restarting the gateway.

What this means

The OpenClaw gateway may restart as part of the update without a separate final restart prompt.

Why it was flagged

The script restarts the gateway automatically after the initial update confirmation, while SKILL.md says the user confirms restart separately. The restart is purpose-aligned, but the confirmation flow is less explicit than documented.

Skill content
log_info "Restarting Gateway..."; run_cmd systemctl --user restart openclaw-gateway
Recommendation

Add a specific restart confirmation prompt before calling `systemctl --user restart openclaw-gateway`, or update the documentation to clearly state that the initial confirmation includes restart.

What this means

Sensitive auth information may be duplicated into `~/.openclaw/backups`, increasing the number of files that must be protected or cleaned up.

Why it was flagged

The updater locally copies the OpenClaw auth profile file into a backup directory. This is disclosed and consistent with backup behavior, but auth profiles may contain sensitive account/session material.

Skill content
cp "$HOME/.openclaw/agents/main/agent/auth-profiles.json" "$backup_dir/auth-profiles.json.bak.$backup_suffix"
Recommendation

Check permissions on `~/.openclaw/backups`, keep backups only as long as needed, and avoid sharing or syncing that directory.

What this means

The update result can change over time depending on upstream repository contents.

Why it was flagged

The script fetches and builds from the current upstream branch rather than a pinned commit. That is expected for a source updater, but it means the installed code depends on the current state of the upstream repository.

Skill content
git remote add upstream https://github.com/openclaw/openclaw.git ... run_cmd git fetch upstream
Recommendation

Review the upstream changes or pin to a known trusted commit/tag before building and globally installing if reproducibility matters.