Back to skill

Security audit

Autoclaw

Security checks for vulnerabilities and agentic risk

Overview

AutoClaw is a disclosed workspace health and backup tool, but it copies sensitive agent workspace files into plaintext backups using a hard-coded Administrator workspace path and weak user control.

Review carefully before installing or running. Only use it on a workspace you explicitly intend to back up, verify or modify the hard-coded workspace path first, and assume the created backups may contain private memory, configuration, and database contents until protected or removed.

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
autoclaw.py:105
Finding

Unconditional Plaintext Backup of Sensitive Agent Workspace Data

Content
View full analysis

Vulnerability Details

File Location: autoclaw.py:105-110 and autoclaw.py:195-197
Vulnerability Type: Sensitive data copied outside its minimum required scope using a hard-coded workspace path
Risk Level: Medium

Vulnerable Code

python
files_to_backup = [
    'config.json',
    'MEMORY.md',
    'docs/lessons-learned.md',
    'memory_data/ai_memory.db',
]
python
if __name__ == '__main__':
    workspace = "C:\\Users\\Administrator\\.openclaw\\workspace"
    autoclaw = AutoClaw(workspace)
    autoclaw.run()

Technical Analysis

The documented execution path unconditionally selects a hard-coded Administrator OpenClaw workspace and copies configuration, long-term memory, learned information, and the memory database into the workspace's backups directory.

These files can contain credentials, private operational context, user information, agent state, or other sensitive data. The backups are ordinary filesystem copies created through shutil.copy2; the implementation does not encrypt them, restrict backup permissions explicitly, verify workspace ownership, or require per-file user approval.

Although the README describes an autoclaw_config.json configuration mechanism, the implementation does not load that file. Consequently, users cannot select the workspace or opt out of sensitive memory backups through the advertised configuration interface.

This issue does not itself bypass operating-system permissions or transmit data over a network. Exploitation requires the process to have read access to the source workspace and an attacker or another local process to obtain access to the resulting backup files.

Attack Path

  1. A user executes the documented command: python autoclaw.py.
  2. The program selects C:\Users\Administrator\.openclaw\workspace without validating that it belongs to the invoking user or was explicitly authorized.
  3. auto_backup() searches that ...[truncated 1153 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the hard-coded Administrator workspace and require an explicit workspace argument or a validated configuration file.
  2. Resolve the workspace to a canonical path and verify that it exists, is expected, and is owned by or explicitly authorized for the invoking user.
  3. Require explicit opt-in before backing up MEMORY.md, memory databases, configuration files, or other potentially sensitive data.
  4. Support a configurable allowlist and denylist so users can precisely control backup contents.
  5. Create backup directories and files with restrictive permissions accessible only to the intended account.
  6. Encrypt sensitive backups at rest using a user-controlled key and avoid storing the key alongside the backups.
  7. Warn users when a backup target is synchronized, shared, or accessible by other accounts.
  8. Document retention and secure deletion behavior, and provide a command to remove existing sensitive backups.
  9. Implement the configuration interface described in the README and fail safely when the workspace has not been explicitly configured.
  10. Add tests confirming that the application refuses unexpected, privileged, shared, or unowned workspace paths.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents behaviors that can affect user data and system integrity: automatic backups, deletion of old backups, and restarting processes. While the features are described, there is no explicit caution or warning to users about file retention/deletion or that enabling auto-restart may alter running system state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly advertises automated backups and workspace health checks but does not warn users that it may access, copy, or retain potentially sensitive workspace data. In an AI-agent environment, backup behavior can affect confidentiality and storage destinations, so the lack of disclosure and consent creates a real security and privacy risk even though the markdown does not itself prove malicious behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states the tool provides '健康检查 + 自动备份 + 进程守护', and the configuration/process definitions further imply active process supervision with auto-restart support. However, check_processes merely verifies the existence of a script file and does not inspect running processes or execute the declared start command, contradicting the documented intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains natural-language descriptions and later user-visible log output in Chinese, but there is no indication that the skill is region-specific or that users can opt into a preferred language. That creates a language/locale policy issue because the skill effectively imposes one language on all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

A natural-language policy issue exists because the skill content forces a specific language presentation without opt-in or explanation. There is no indication that the skill is region-specific or that users can choose another language or locale.

Content

No source excerpt is available for this finding.