backup-2-github
Hardcoded default GitHub repository could silently exfiltrate user configuration data to an unintended third-party repository if token is set but repo is not configured.
Why this conclusion was reached
2/4 dimensions flagged2 undeclared or violating capabilities were inferred.
No obvious high-risk egress or execution signals were found.
The report includes 4 attack-chain steps and 1 severe findings.
2 dependency or supply-chain issues need attention.
Attack Chain
Entry · backup.py:24
Escalation · backup.py:27
Impact · backup.py:134
Impact · _clawsafe/pre-scan.json
What drove the risk score up
Default GITHUB_REPO='fangbb-coder/OC-backup' means user's GitHub token will push sensitive configs to a third-party repo if only GITHUB_TOKEN is set
SKILL.md mentions backing up credentials/*.json but BACKUP_FILES in backup.py does not include this path
PyGithub uses >=1.59.0 and python-dotenv uses >=1.0.0, allowing supply chain attacks via version upgrades
Most important evidence
Hardcoded Default Repository Exposes User Data
The GITHUB_REPO defaults to 'fangbb-coder/OC-backup'. If a user sets only GITHUB_TOKEN (or has it from another context) without configuring GITHUB_REPO, their entire OpenClaw configuration — including USER.md, IDENTITY.md, SOUL.md, TOOLS.md, MEMORY.md, openclaw.json, and cron configs — will be silently pushed to the hardcoded third-party repository.
backup.py:27 Credentials Backup Claimed But Not Implemented
SKILL.md explicitly mentions backing up 'credentials/*.json (Xiaohongshu cookies, etc.)' but the BACKUP_FILES list in backup.py does not include any credentials paths. This creates a false expectation for users seeking credential backup functionality.
SKILL.md:24 Unpinned Dependency Versions
PyGithub uses >=1.59.0 and python-dotenv uses >=1.0.0, allowing automatic upgrades to newer versions that could introduce malicious code.
requirements.txt:1 Undeclared Environment Variable Access
The skill reads GITHUB_TOKEN and GITHUB_REPO from environment variables but does not declare 'environment' as a capability in SKILL.md or skill.yaml.
backup.py:24 Declared capability vs actual capability
Reads ~/.openclaw/workspace and ~/.openclaw paths only for backup purposes SKILL.md declares 'github' capability but backup.py silently defaults to hardcoded repo without explicit consent Reads GITHUB_TOKEN and GITHUB_REPO from env vars without declaring in SKILL.md No shell execution found Suspicious artifacts and egress
No obvious IOC was extracted.
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| PyGithub | >=1.59.0 | pip | No | Version not pinned, uses >= constraint |
| python-dotenv | >=1.0.0 | pip | No | Version not pinned, uses >= constraint |
File composition
backup.py SKILL.md requirements.txt