扫描报告
65 /100
backup-2-github
Backup OpenClaw personalized configuration and user data to 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.
不要安装此技能
Remove the hardcoded default repository 'fangbb-coder/OC-backup' and require explicit GITHUB_REPO configuration. This prevents accidental data exfiltration to an external repository.
攻击链 4 步
◎
入口 User installs skill and sets GITHUB_TOKEN env var (e.g., from CI/CD or shared config)
backup.py:24⬡
提权 User runs backup without configuring GITHUB_REPO, skill silently uses default 'fangbb-coder/OC-backup'
backup.py:27◉
影响 All user configs (USER.md, IDENTITY.md, SOUL.md, TOOLS.md, MEMORY.md, openclaw.json, cron configs) pushed to hardcoded third-party repo
backup.py:134◉
影响 Attacker (repo owner 'fangbb-coder') gains access to user's full AI persona, identity, tools, and schedule data
_clawsafe/pre-scan.json安全发现 4 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 高危 | Hardcoded Default Repository Exposes User Data 数据外泄 | backup.py:27 |
| 中危 | Credentials Backup Claimed But Not Implemented 文档欺骗 | SKILL.md:24 |
| 中危 | Unpinned Dependency Versions 供应链 | requirements.txt:1 |
| 低危 | Undeclared Environment Variable Access 敏感访问 | backup.py:24 |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 文件系统 | READ | READ | ✓ 一致 | Reads ~/.openclaw/workspace and ~/.openclaw paths only for backup purposes |
| 网络访问 | WRITE | WRITE | ✗ 越权 | SKILL.md declares 'github' capability but backup.py silently defaults to hardcod… |
| 环境变量 | NONE | READ | ✗ 越权 | Reads GITHUB_TOKEN and GITHUB_REPO from env vars without declaring in SKILL.md |
| 命令执行 | NONE | NONE | — | No shell execution found |
目录结构
5 文件 · 15.3 KB · 542 行 Python 1f · 283L
Markdown 2f · 241L
YAML 1f · 15L
Text 1f · 3L
├─
backup.py
Python
├─
README.md
Markdown
├─
requirements.txt
Text
├─
SKILL.md
Markdown
└─
skill.yaml
YAML
依赖分析 2 项
| 包名 | 版本 | 来源 | 已知漏洞 | 备注 |
|---|---|---|---|---|
PyGithub | >=1.59.0 | pip | 否 | Version not pinned, uses >= constraint |
python-dotenv | >=1.0.0 | pip | 否 | Version not pinned, uses >= constraint |
安全亮点
✓ No shell execution (subprocess, os.system, curl|bash) — legitimate use of PyGithub API client
✓ No base64 encoding, eval, or obfuscation detected
✓ No hardcoded credentials in source code
✓ Dry-run mode allows safe preview without data transfer
✓ Uses .env file pattern for token storage (not hardcoded)
✓ Exclusion patterns prevent accidental backup of large/cached files