T09 · Insecure Skill Coding Practices
- Location
backup.py:26- Finding
Plaintext Upload of Sensitive OpenClaw Data to a Hard-Coded Default Repository
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This backup skill is purpose-aligned, but it handles very sensitive OpenClaw data and can overwrite persistent local agent state from unverified GitHub content.
Install only if you are comfortable sending OpenClaw memory, profile, persona, configuration, scheduled tasks, and possibly credentials to GitHub. Use a dedicated private repository, explicitly set GITHUB_REPO, avoid command-line tokens, use a fine-grained token, review dry-run output, and do not restore unless you have verified the repository content and commit.
backup.py:26Plaintext Upload of Sensitive OpenClaw Data to a Hard-Coded Default Repository
backup.py:177Untrusted Repository Content Can Poison Persistent Agent State During Restore
backup.py:229GitHub Personal Access Token Can Be Exposed Through Command-Line Arguments
requirements.txt:1Malformed and Unpinned Dependency Specification Creates Installation and Supply-Chain Risk
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
This will:
1. Download the latest backup from GitHub
2. Restore files to their original locations
3. Print instructions to restart services
**Important**: Restore will overwrite existing files. Confirm with `yes` when prompted.
The restore flow is documented to overwrite existing files in their original locations, which is a self-modifying behavior that can replace active configuration, identity, memory, cron, and script files. If the backup repository contents are stale, malicious, or compromised, restore could propagate unsafe changes into a fresh or existing OpenClaw installation.
2. Restore files to their original locations
3. Print instructions to restart services
**Important**: Restore will overwrite existing files. Confirm with `yes` when prompted.
## How It Works
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- ✅ Backup only **personalized files** (not default OpenClaw)
- ✅ Restore to fresh installation with identical state
- ✅ Supports GitHub via Personal Access Token
- ✅ Single-commit backup (clean history)
- ✅ Dry-run mode to preview changes
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- ✅ Backup only **personalized files** (not default OpenClaw)
- ✅ Restore to fresh installation with identical state
- ✅ Supports GitHub via Personal Access Token
- ✅ Single-commit backup (clean history)
- ✅ Dry-run mode to preview changes
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- ✅ Backup only **personalized files** (not default OpenClaw)
- ✅ Restore to fresh installation with identical state
- ✅ Supports GitHub via Personal Access Token
- ✅ Single-commit backup (clean history)
- ✅ Dry-run mode to preview changes
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
pip install -r requirements.txt
GITHUB_TOKEN=ghp_your_token_here GITHUB_REPO=your-username/your-backup-repo
The README explicitly states that credentials and highly personal files may be included in backups, but it does not present a prominent warning that these secrets and personal data will be uploaded to a remote GitHub repository. Even if the repository is private, this creates meaningful risk of accidental disclosure, token leakage, or inappropriate long-term storage of sensitive data.
The skill explicitly backs up highly sensitive files such as MEMORY.md, USER.md, IDENTITY.md, SOUL.md, TOOLS.md, cron configuration, and optionally credential JSON files to GitHub, but the description does not present a strong, prominent warning about the privacy and security consequences of transmitting this data off-host. Even with a private repository, this can expose personal profiles, operational details, and reusable credentials if the repository, token, or account is compromised.
The backup operation uploads personal configuration and user data, including files like USER.md, IDENTITY.md, SOUL.md, MEMORY.md, cron jobs, and configuration, to a GitHub repository without an explicit privacy warning or per-run consent at upload time. In this skill context, the data appears highly sensitive and personalized, so silent transmission to a potentially public or misconfigured remote repository materially increases confidentiality risk.
The restore routine does not actually retrieve blob contents from the repository and instead treats commit-file metadata as if it were file data. This can corrupt restored configuration files, overwrite working files with invalid content, and create a denial-of-service condition by breaking the application's configuration or startup state.
The skill explicitly states it will back up personalized configuration and user data to GitHub, but provides no warning, consent flow, or description of what data may be uploaded. This creates a real privacy and security risk because sensitive configuration, secrets, tokens, or personal data could be unintentionally exfiltrated to a remote repository, especially if the repository is misconfigured or public.
The script presents user-facing output in Chinese, and similar Chinese-only messages appear throughout the file. This imposes a specific language on all users without offering a locale choice or documenting that the tool is intended only for a Chinese-speaking audience.
The dependency specification uses a lower-bound constraint (python-dotenv>=1.0.0) rather than pinning to a known-safe version, while the package has known advisories. This creates supply-chain uncertainty: installations may resolve to an affected release depending on environment, mirrors, lockfiles, or future changes, making the security posture unverifiable.
No suspicious patterns detected.