Back to skill

Security audit

Openclaw Backup

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent OpenClaw backup/restore skill, but its restore scripts handle sensitive decrypted data and live OpenClaw replacement in ways users should review carefully before installing.

Install only if you are comfortable backing up OpenClaw credentials and auth profiles to your own Cloudflare R2 bucket, protected by your restic password. Use a strong password, keep .env and .restic-pass private and separate, run the test restore first, manually delete decrypted restore-test/OpenClaw-restore folders after inspection, and avoid non-interactive restore unless you have a separate verified backup of the current .openclaw directory.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
test-restore.ps1:38
Finding

Decrypted OpenClaw Credentials Persist in Local Restore Directories

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
portable/restore-portable.ps1:82
Finding

Destructive Restore Can Continue After Failed or Partial Native Commands

Content
View full analysis
&1 | Out-Null $ErrorActionPreference = $oldEAP $found = Get-ChildItem -Path $UnpackedDir -Directory -Filter '.openclaw' -Recurse | Select-Object -First 1 if (-not $found) { throw "Could not find restored .openclaw under $UnpackedDir" } Write-Host "Restored .openclaw at: $($found.FullName)" -ForegroundColor Green if (Test-Path $Dest) { $BackupDest = $Dest + '.backup-' + (Get-Date -Format 'yyyyMMdd-HHmmss') Write-Host "Destination exists. Moving current to: $BackupDest" -ForegroundColor Yellow try { Move-Item -Path $Dest -Destination $BackupDest -Force } catch { Write-Host "Move failed (locked). Will overwrite in place." -ForegroundColor Yellow } } Write-Host "Copying to: $Dest" -ForegroundColor Cyan try { Copy-Item -Path $found.FullName -Destination $Dest -Recurse -Force } catch { Write-Host "Copy failed: $($_.Exception.Message)" -ForegroundColor Red; throw } if (Get-Command openclaw -ErrorAction SilentlyContinue) { & openclaw config validate | Out-Null & openclaw status | Out-Null Write-Host "OK: openclaw looks healthy." -ForegroundColor Green } ``` ### Technical Analysis The script inv ...[truncated 2625 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · backup.ps1 (reported line 9)May include surrounding context.

text
#
# Coloque nesta mesma pasta:
#   restic\restic.exe   (binario do restic)
#   .env                (credenciais R2 + RESTIC_REPOSITORY)
#   .restic-pass        (senha do repositorio)
#
# O script: baixa o backup mais recente do R2, extrai e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · backup.ps1 (reported line 36)May include surrounding context.

text
#
# Coloque nesta mesma pasta:
#   restic\restic.exe   (binario do restic)
#   .env                (credenciais R2 + RESTIC_REPOSITORY)
#   .restic-pass        (senha do repositorio)
#
# O script: baixa o backup mais recente do R2, extrai e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · backup.ps1 (reported line 38)May include surrounding context.

text
#
# Coloque nesta mesma pasta:
#   restic\restic.exe   (binario do restic)
#   .env                (credenciais R2 + RESTIC_REPOSITORY)
#   .restic-pass        (senha do repositorio)
#
# O script: baixa o backup mais recente do R2, extrai e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · portable/restore-portable.ps1 (reported line 9)May include surrounding context.

text
#
# Coloque nesta mesma pasta:
#   restic\restic.exe   (binario do restic)
#   .env                (credenciais R2 + RESTIC_REPOSITORY)
#   .restic-pass        (senha do repositorio)
#
# O script: baixa o backup mais recente do R2, extrai e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test-restore.ps1 (reported line 22)May include surrounding context.

text
#
# Coloque nesta mesma pasta:
#   restic\restic.exe   (binario do restic)
#   .env                (credenciais R2 + RESTIC_REPOSITORY)
#   .restic-pass        (senha do repositorio)
#
# O script: baixa o backup mais recente do R2, extrai e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · backup.ps1 (reported line 37)May include surrounding context.

text
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$ResticExe = Join-Path $Root 'restic\restic.exe'
$EnvFile = Join-Path $Root '.env'
$PassFile = Join-Path $Root '.restic-pass'

if (!(Test-Path $ResticExe)) { throw "Missing: $ResticExe" }

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · portable/restore-portable.ps1 (reported line 19)May include surrounding context.

text
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$ResticExe = Join-Path $Root 'restic\restic.exe'
$EnvFile = Join-Path $Root '.env'
$PassFile = Join-Path $Root '.restic-pass'

if (!(Test-Path $ResticExe)) { throw "Missing: $ResticExe" }

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test-restore.ps1 (reported line 20)May include surrounding context.

text
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$ResticExe = Join-Path $Root 'restic\restic.exe'
$EnvFile = Join-Path $Root '.env'
$PassFile = Join-Path $Root '.restic-pass'

if (!(Test-Path $ResticExe)) { throw "Missing: $ResticExe" }

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.md (reported line 112)May include surrounding context.

md
> ⚠️ **This OVERWRITES your live `.openclaw`.** The restore replaces `%USERPROFILE%\.openclaw` with the latest backup from R2. **Anything created after the last backup — new agents, credentials, config changes — is lost.** The script asks you to type `RESTAURAR` to confirm, and moves your current folder to `.openclaw.backup-<date>` first. But that local backup can fail if files are locked (e.g. the gateway is running), in which case it overwrites in place. **Run `test-restore.ps1` first** to inspect the backup non-destructively, and only run the real restore when you're sure you want to replace the active install.
>
> Non-interactive automation can skip the prompt by setting `$env:OPENCLAW_RESTORE_YES = 1` — do this only when you fully understand it overwrites without asking.

---

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Comments and operational/status strings throughout the script are written in Portuguese, including error messages and runtime logs. This imposes a specific language on users without opt-in or any indication that the skill is intentionally limited to Portuguese-speaking contexts.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.