Back to skill

Security audit

Soul Transfer

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for backup and restore, but it handles credentials, agent instructions, skills, and recurring Git pushes in ways that could expose secrets or restore unsafe authority.

Install only after reviewing and changing the workflow: do not commit plaintext secrets to Git, avoid tokens in Git URLs, restore only from a trusted pinned revision, review restored skills and instruction files before activation, do not restore exec security increases automatically, and disable or narrow the recurring cron jobs unless you explicitly want unattended pushes.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/soul-backup.sh:23
Finding

Plaintext credential backup is indiscriminately committed and pushed to Git

Content
View full analysis
/dev/null; then echo "📋 Exporting OpenClaw config..." openclaw config get --json 2>/dev/null | python3 -c " import sys, json try: data = json.load(sys.stdin) parsed = data.get('result', {}).get('parsed', data) with open('$CONFIG_BACKUP', 'w') as f: json.dump(parsed, f, indent=2) print(' ✅ Config exported to $CONFIG_BACKUP') except Exception as e: print(f' ⚠️ Config export failed: {e}') " 2>/dev/null || echo " ⚠️ Config export skipped (openclaw not available)" fi # Stage all changes git add -A # Check if there are changes if git diff --cached --quiet; then echo "✅ No changes to backup" exit 0 fi # Commit MSG="${1:-backup: $(date +%Y-%m-%d_%H%M)}" git commit -m "$MSG" # Push echo "📤 Pushing to remote..." git push origin master 2>&1 || git push origin main 2>&1 ``` The corresponding documented procedure explicitly states that the exported file contains credentials and should be committed: ```markdown Use `gateway config.get` tool → extract the `parsed` object → write to a JSON file in the workspace (e.g. `openclaw-config-backup.json`). This step is critical — without this file, channel connections cannot be restored on a new instance. ### 3. Commit and push ```bash git add -A git commit -m "backup: $(date +%Y-%m-%d_%H%M)" git push origin master ``` ``` ### Technical Analysis The script obtains the complete parsed OpenClaw configuration, including channel tokens, API keys, environment variables, and runtime settings, and writes it to a plaintext JSON file. It does not: - Encrypt the exported data. - Restrict the file permissio ...[truncated 1806 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:27
Finding

Git authentication token is placed directly in command-line URLs

Content
View full analysis
@github.com//.git ``` The restore instructions repeat the same pattern: ```bash git clone https://@github.com//.git /tmp/soul-backup ``` ### Technical Analysis Embedding an access token in an HTTPS Git URL exposes it to multiple persistence and observation channels. For `git remote add`, the full token-bearing URL is stored in `.git/config`. For both examples, the command may also be retained in shell history, terminal logging, audit records, support captures, process telemetry, or automation logs. The token is treated as ordinary URL text rather than being supplied through a protected credential mechanism. Any local account, diagnostic collector, backup process, or repository archive that can read the relevant history or configuration may recover it. ### Attack Path 1. The user replaces the placeholder with a real repository access token. 2. The token-bearing command is entered in an interactive shell or automation environment. 3. The command is recorded in shell history or operational logs. 4. When configuring `origin`, Git also stores the credential-bearing URL in `.git/config`. 5. An attacker or unauthorized local user reads the history, logs, workspace backup, or Git configuration. 6. The attacker extracts the token and authenticates to the repository provider. 7. The attacker reads private backups, modifies restoration content, or performs any other action granted by the token. ### Impact Assessment The attainable privileges are determined by the token scope. Possible impact includes: - Reading private backup repositories and their secrets. - Modifying backup contents to compromise later restoration. - Deleti ...[truncated 200 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:74
Finding

Untrusted backup repository can replace persistent agent instructions and executable skills

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:107
Finding

Restore procedure explicitly enables unrestricted command execution from mutable backup configuration

Content
View full analysis
", "groupPolicy": "allowlist", "guilds": { "..." }, "dm": { "..." }, "actions": { "..." } } }, "tools": { "web": { "search": { "apiKey": "" } }, "exec": { "security": "full" } } } ``` After patching, OpenClaw restarts automatically. Verify with `openclaw status` — channels should show connected. ``` ### Technical Analysis The procedure restores security-sensitive configuration from the backup repository and explicitly sets execution security to `full`. This breaks least privilege by enabling unrestricted execution without demonstrating that such access is required for backup or restoration. The same mutable backup can supply channel tokens, API keys, environment variables, tool settings, and communication policies. No restrictive schema, privilege comparison, administrator confirmation, or rejection of security-level increases is required before applying the configuration. This condition compounds the untrusted restoration issue: attacker-controlled persistent instructions or Skills can operate with the newly granted execution capability after OpenClaw restarts. ### Attack Path 1. An attacker modifies the backup repository or the exported configuration. 2. The victim restores instruction files, Skills, and configuration from that repository. 3. The victim applies the c ...[truncated 1088 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
references/cron-templates.md:5
Finding

Recurring autonomous backup job persistently uploads all workspace changes

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code substantially matches the backup portion of the description: it operates on the OpenClaw workspace, exports configuration including sensitive tokens/API keys, commits all changes, and pushes to a Git remote. However, the declared purpose explicitly includes both backup and restore of a full workspace, while the supplied code implements only backup. There is no restore logic, no pull/clone/apply process, and no cron-job restoration or verification workflow. This is a material description-behavior mismatch because a major claimed capability—restore—is absent.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill's core workflow backs up and restores highly sensitive material including credentials, API keys, tokens, and environment variables via Git. Even if intended for disaster recovery, placing secret-bearing state into version control substantially increases disclosure risk and makes compromise persistent across history and clones.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions normalize committing credentials, tokens, and API keys into a Git repository without a strong warning about repository exposure, access control, retention, or secret compromise. This creates a straightforward path to secret leakage through remote hosting, logs, forks, cached clones, and accidental sharing.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This step explicitly directs exporting the live parsed config containing channel tokens and API keys into a JSON file in the workspace and then committing it to the backup repo. That turns active secrets into version-controlled artifacts that may persist indefinitely and be exposed to anyone with repository or host access.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The restore procedure reads secret-bearing backup JSON from repository contents and reapplies tokens, API keys, and environment variables directly into runtime configuration. This trusts repository content as an authority for secrets, enabling secret reintroduction, rollback to compromised credentials, or malicious config injection if the repo is tampered with.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill instructs rm -rf /tmp/soul-backup, which is a destructive filesystem operation. While the path is specific and intended as cleanup, any variable substitution mistake, path confusion, symlink abuse, or copied adaptation of this pattern in an agent context can lead to deletion of unintended data.

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
openclaw status

# Delete temp clone
rm -rf /tmp/soul-backup

# Delete BOOTSTRAP.md if present (no longer a fresh instance)
rm -f $WORKSPACE/BOOTSTRAP.md

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill instructs rm -rf /tmp/soul-backup, which is a destructive filesystem operation. While the path is specific and intended as cleanup, any variable substitution mistake, path confusion, symlink abuse, or copied adaptation of this pattern in an agent context can lead to deletion of unintended data.

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
openclaw status

# Delete temp clone
rm -rf /tmp/soul-backup

# Delete BOOTSTRAP.md if present (no longer a fresh instance)
rm -f $WORKSPACE/BOOTSTRAP.md

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The command rm -f $WORKSPACE/BOOTSTRAP.md deletes a file inside a variable-derived path. Although limited in scope, using a variable in a destructive command without validation can become unsafe if $WORKSPACE is unset, malformed, or attacker-influenced through environment or prompt context.

Content

Scanner excerpt · SKILL.md (reported line 153)May include surrounding context.

md
rm -rf /tmp/soul-backup

# Delete BOOTSTRAP.md if present (no longer a fresh instance)
rm -f $WORKSPACE/BOOTSTRAP.md

# Commit restored state
cd $WORKSPACE

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script explicitly exports the agent's full OpenClaw configuration, including tokens and API keys, into a JSON file inside the workspace and then stages and pushes all changes to the configured Git remote. This creates a direct secret-exfiltration path to whatever remote repository is configured, with no confirmation, filtering, encryption, or warning, and is especially dangerous because the skill is specifically designed for backup/migration of credentials and workspace state.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs file writes, Git operations, and deletion of files, but it does not declare any explicit tool scope or allowed-tools boundary. In an agent system, missing scope makes it easier for the skill to be invoked with broader-than-necessary capabilities, increasing the blast radius of mistakes during backup or restore.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest includes broad trigger phrases like 'backup', 'restore', 'transfer', and migration-related synonyms, which can cause the skill to activate in contexts where the user did not intend a full workspace and secret-handling workflow. Because this skill touches credentials and configuration, accidental invocation materially raises security risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Memory Backup template directs the agent to run git add/commit/push and even configure a remote if none exists, but it does not warn that this modifies repository state and transmits workspace contents to an external destination. Because this skill is explicitly for backing up memory, config, credentials, skills, and cron jobs, the lack of an explicit consent boundary is particularly risky: sensitive data may be committed and exfiltrated automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The embedded instruction text is written entirely in Chinese and implicitly directs the skill to operate in that language. There is no indication that language is user-selectable or that the template is intentionally restricted to a Chinese-language environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This scheduled optimization template uses only Chinese instruction text and does not offer a language option. That creates a locale-specific constraint without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Daily Community Scan cron template is outside the stated backup/restore purpose of the skill and instructs the agent to perform external browsing and write collected content into memory files. In a skill that already handles full-workspace backup, adding unrelated autonomous scanning expands the attack surface and can cause unexpected network access, data ingestion, and persistence without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The community-scan message is fully in Chinese and does not indicate that users can select another language or locale. This is a natural-language policy issue because the template imposes a language choice by default.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The community scan template performs external access to community content and persists gathered results into local memory/log files without disclosing those side effects in the template itself. While less severe than credential backup, it still creates silent data ingestion and storage behavior that users may not expect from a backup-oriented skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.