Back to skill

Security audit

openclaw workspace backup

Security checks for vulnerabilities and agentic risk

Overview

This skill performs real automated git backups, but it can silently stage, commit, and push configured workspaces to whatever origin is set, with limited safeguards.

Install only if you are comfortable with daily automated commits and pushes from every configured workspace. Review the configured paths, verify each repository origin before enabling it, avoid --force unless you understand the remote-history impact, and scan repositories for secrets before backup.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The documented behavior does not accurately match the described behavior: it omits how scheduled execution and trigger handling are implemented, adds a status mode that can expose repository state and recent logs, and does not guarantee the remote is actually GitHub. This mismatch can mislead users about what data is accessed, when the skill runs, and where repository contents are sent.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 3)May include surrounding context.

md
---
name: workspace-backup
description: 将工作空间 git 仓库备份到 GitHub 各分支。通过 .env 配置目录列表,每天 03:00 自动执行。当用户说"workspace-backup"、"备份工作空间"、"工作空间备份"时触发。
metadata: {"openclaw":{"emoji":"💾","requires":{"bins":["git"]},"install":"pip install -e {baseDir}"}}
---

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 · workspace_backup/cli.py (reported line 8)May include surrounding context.

python
from pathlib import Path

LOG_FILE      = Path.home() / ".openclaw" / "logs" / "backup.log"
ENV_FILE_PKG  = Path(__file__).parent / ".env"
ENV_FILE_USER = Path.home() / ".config" / "workspace" / ".env"

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 · workspace_backup/cli.py (reported line 9)May include surrounding context.

python
from pathlib import Path

LOG_FILE      = Path.home() / ".openclaw" / "logs" / "backup.log"
ENV_FILE_PKG  = Path(__file__).parent / ".env"
ENV_FILE_USER = Path.home() / ".config" / "workspace" / ".env"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

Exposing git push --force as a simple CLI flag creates a powerful destructive capability that can be triggered without safeguards. In the context of a backup automation skill, parameterized force pushes materially increase the risk of accidental or harmful overwrites of remote repository history.

Content

Scanner excerpt · workspace_backup/cli.py (reported line 128)May include surrounding context.

python
parser = argparse.ArgumentParser(prog="workspace", description="OpenClaw 工作空间备份工具")
    parser.add_argument("--backup", action="store_true", help="备份所有工作空间(默认行为)")
    parser.add_argument("--status", action="store_true", help="查看各工作空间 git 状态及最近备份日志")
    parser.add_argument("--force", action="store_true", help="强制推送(git push --force),与 --backup 配合使用")
    args = parser.parse_args()

    sys.exit(cmd_status() if args.status else cmd_backup(force=args.force))

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares capabilities that imply shell execution and file read/write behavior but does not scope or constrain the tools it is allowed to use. In a backup skill that touches local repositories and performs git operations, missing tool restrictions increases the chance of unintended filesystem access or command execution beyond the stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill backs up local git repositories to a remote service but does not clearly warn users that repository contents may include secrets, proprietary code, or personal data that will leave the machine. In this context, silent off-host transmission is risky because users may configure broad workspace directories and assume backup is harmless.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation advertises a force-push mode without warning that it can overwrite remote branch history. This can cause irreversible data loss or destroy the integrity of backups if used incorrectly, especially in an automated or recovery scenario.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · workspace_backup/cli.py (reported line 53)May include surrounding context.

python
def git(args: list, cwd: str, **kwargs) -> subprocess.CompletedProcess:
    return subprocess.run(["git"] + args, cwd=cwd, capture_output=True, **kwargs)


def backup_workspace(path: str, branch: str, force: bool = False) -> bool:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises backups to GitHub branches, but the code pushes to whatever repository is configured as origin without validating the remote host or repository. In a hostile or misconfigured workspace, this can exfiltrate source code and secrets to an attacker-controlled remote while appearing to perform a normal backup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The --force option enables git push --force with no interactive confirmation, no branch protections, and no remote validation. In an automated skill that runs on user invocation or schedule, this can overwrite remote history and destroy data on the destination branch, especially if the wrong origin is configured.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description uses Chinese for invocation and behavior details, and the file does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a specific language is imposed without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest description is written only in Chinese ("OpenClaw 工作空间备份工具"), which indicates a language-specific presentation without any visible user choice or documented regional justification in this file. This can conflict with organizational language/locale policies that require opt-in or explicit scope for non-default language constraints.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The description focuses on backing up repositories to remote branches, which suggests synchronization of existing repository state. The code stages all changes and creates a new local commit in each workspace, a stronger local modification behavior that is not stated in the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The argument parser description and help text are hard-coded in Chinese, which imposes a specific language on all users. The file does not provide any opt-in, locale selection, or justification for this language restriction.

Content

No source excerpt is available for this finding.