Openclaw Backup

Security checks across static analysis, malware telemetry, and agentic risk

Overview

The backup/restore purpose is mostly coherent, but the GitHub push workflow can expose more sensitive backup material than the documentation implies.

Install only if you are comfortable backing up your OpenClaw workspace and, optionally, encrypted secrets. Before using GitHub push, verify the target repository is private and confirm whether a secrets archive will be included. Treat operational backups as sensitive, run restore with --dry-run first, and enable the daily cron only if you want ongoing background backups.

Static analysis

No static analysis findings were reported for this release.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Risk analysis

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 backup containing .env files or agent auth profiles, although age-encrypted, may be uploaded to GitHub as part of a normal push when the user expected an operational-only upload.

Why it was flagged

The script can discover a secrets archive from the manifest and copy it to the GitHub repo even when the user did not pass --secrets.

Skill content
if [ -n "$EXPECTED_SECRETS" ] && [ -f "$EXPECTED_SECRETS" ]; then
    SECRETS_PATH="$EXPECTED_SECRETS"
...
if [ -n "$SECRETS_PATH" ]; then
  cp "$SECRETS_PATH" "$REPO_DIR/archives/$(basename "$SECRETS_PATH")"
fi
Recommendation

Require an explicit --secrets flag and a confirmation prompt before pushing any secrets archive, and avoid pushing encrypted secrets unless there is a clear recovery need.

What this means

If a repo with the chosen name already exists and is public, operational backups containing workspace memory, prompts, scripts, and possibly encrypted secrets could be pushed publicly despite the private-backup framing.

Why it was flagged

The script only enforces --private when creating a new repository; an existing repository is used without checking whether it is private.

Skill content
if gh repo view "$OWNER/$REPO_NAME" >/dev/null 2>&1; then
  info "Using existing repo: $OWNER/$REPO_NAME"
  gh repo clone "$OWNER/$REPO_NAME" "$WORK_DIR/$REPO_NAME" >/dev/null
else
  info "Creating private repo: $OWNER/$REPO_NAME"
  gh repo create "$REPO_NAME" --private --clone ...
Recommendation

Check repository privacy before pushing, refuse public repos by default, and show the target repo and privacy status for user confirmation.

What this means

Even without API keys, operational backups may contain private context, business logic, instructions, or sensitive notes that should not be treated as harmless.

Why it was flagged

The operational archive intentionally includes persistent agent memory, prompts, scripts, and skills, and that archive is not encrypted by default.

Skill content
`$HOME/.openclaw/workspace/` | Yes | Core agent memory, prompts, notes, local scripts, custom skills, active artifacts
Recommendation

Review operational archives before cloud or GitHub storage, and consider encrypting the operational archive too if the workspace contains private information.

What this means

Restoring an untrusted or tampered backup could execute shell code contained in that backup.

Why it was flagged

After restore, the script automatically runs a shell health-check script from the restored workspace if present.

Skill content
HEALTHCHECK_SCRIPT="$OPENCLAW_DIR/workspace/scripts/pre-restart-check.sh"
if [ -f "$HEALTHCHECK_SCRIPT" ]; then
  if ! bash "$HEALTHCHECK_SCRIPT"; then
Recommendation

Only restore trusted backups; inspect or remove workspace/scripts/pre-restart-check.sh before a real restore if the archive source is uncertain.

What this means

A mistaken restore or wrong archive can materially change the agent’s local configuration, memory, skills, and scheduled jobs.

Why it was flagged

A real restore can replace the local OpenClaw installation, but it is user-directed and prompts unless --force/--yes is used.

Skill content
printf 'Restore into %s? Type RESTORE to continue: ' "$OPENCLAW_DIR"
...
mv "$OPENCLAW_DIR" "$PRE_RESTORE_BACKUP"
...
mv "$STAGING_DIR" "$OPENCLAW_DIR"
Recommendation

Run --dry-run first, verify the manifest and archive paths, and avoid --force unless operating in a controlled recovery procedure.

What this means

Backups may continue running in the background and producing archives until the cron job is removed.

Why it was flagged

The schedule script creates or replaces a persistent OpenClaw cron job that runs the backup command daily.

Skill content
openclaw cron delete "$EXISTING_ID" >/dev/null
...
openclaw cron create --json --name "$CRON_NAME" --cron "$CRON_EXPR" --system-event "$SYSTEM_EVENT"
Recommendation

Use scheduling only if you want recurring backups, and audit with `openclaw cron list` after installation.

What this means

The GitHub push workflow may fail or not include the intended ignore template; this is a provenance/reliability gap rather than evidence of hidden execution.

Why it was flagged

The script references templates/.gitignore, but that file is not present in the supplied file manifest.

Skill content
cp "$SKILL_DIR/templates/.gitignore" "$REPO_DIR/.gitignore"
Recommendation

Include the referenced template file in the package or remove the dependency and document the expected .gitignore behavior.