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.
为什么得出这个结论
2/4 个维度触发发现 2 项声明之外的能力或越权行为。
当前没有明显的高危外联或执行信号。
报告包含 4 步攻击链,另有 1 项高危或严重发现。
发现 2 项需要关注的依赖或供应链线索。
攻击链
初始入口 · backup.py:24
权限提升 · backup.py:27
最终危害 · backup.py:134
最终危害 · _clawsafe/pre-scan.json
风险分是怎么被拉高的
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
最关键的证据
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 声明能力 vs 实际能力
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 可疑产物与外联
没有提取到明显 IOC。
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| PyGithub | >=1.59.0 | pip | 否 | Version not pinned, uses >= constraint |
| python-dotenv | >=1.0.0 | pip | 否 | Version not pinned, uses >= constraint |
文件构成
backup.py SKILL.md requirements.txt