Why this conclusion was reached
1/4 dimensions flagged Pass Declared vs actual capability Declared resources and inferred behavior are broadly aligned.
Review Hidden execution and egress 2 lower-risk artifacts were extracted and still need context.
Block Attack chain and severe findings The report includes 4 attack-chain steps and 1 severe findings.
Review Dependencies and supply chain hygiene 2 dependency or supply-chain issues need attention.
Attack Chain
01 用户安装 agent-guardian skill Entry · SKILL.md:1
02 install.sh 以 root 权限部署 systemd 服务 Escalation · scripts/install.sh:60
03 apply-qqbot-patch.sh 通过 sed 向插件注入 execSync Escalation · scripts/apply-qqbot-patch.sh:28
04 patch 后插件每次收消息执行 Python 脚本 Impact · references/patches/qqbot.md:25
What drove the risk score up
apply-qqbot-patch.sh sed 注入 execSync 修改插件 +20
通过 sed 向 gateway.ts/outbound.ts 注入 execSync 调用,执行 Python 脚本,存在通过 patch 链注入恶意代码的理论风险
install.sh 以 root 部署 systemd 服务 +10
systemd 服务以 User=root 运行,Restart=always,存在持久化风险
patch 脚本无完整性校验 +8
apply-qqbot-patch.sh 无 hash 校验,直接覆盖插件源文件
langdetect 依赖无版本锁定 +5
install.sh 中 pip3 install langdetect 未指定版本
状态文件存于 /tmp +2
/tmp 目录多进程共享,存在竞态条件信息泄露风险
Most important evidence
High RCE
apply-qqbot-patch.sh 通过 sed 注入 execSync 修改第三方插件
patch 脚本使用 sed 将包含 execSync 的 TypeScript 代码注入到 gateway.ts/outbound.ts,虽然当前注入代码使用了 JSON.stringify 防护,但修改插件源码的行为本身存在通过 patch 链注入恶意代码的理论风险,且 patch 脚本无完整性校验
scripts/apply-qqbot-patch.sh:28 在文档中明确警告此风险,建议用户提供 hash 校验或使用 patch/diff 方式替代 sed 字符串注入
Medium Persistence
systemd 服务以 root 身份持久化运行
install.sh 创建的 systemd 服务以 User=root、Restart=always 运行,安装后持续存在于系统层面,不随 AI 会话结束而终止
scripts/install.sh:60 skill-card.md 已有警告,建议在安装时更明确提示,并提供 uninstall.sh 清理脚本
Medium Supply Chain
langdetect 依赖无版本锁定
install.sh 中 pip3 install langdetect 未指定版本,依赖 latest,可能引入供应链风险
scripts/install.sh:44 添加版本锁定:pip3 install langdetect==1.0.9 或使用 requirements.txt
Low Sensitive Access
状态文件存于 /tmp 共享目录
/tmp 是多进程共享目录,/tmp/agent-work-state.json 等可能被其他进程读写或泄露信息
scripts/supervisor.sh:10 使用 /run/user/{uid}/ 或带 ACL 的专用目录
Info Priv Escalation
install.sh 需要 root 权限
install.sh 需要 root 权限来执行 systemctl、crontab、apt-get 等操作,文档中未明确说明
scripts/install.sh:1 在文档开头明确说明 root 权限需求
Declared capability vs actual capability
Filesystem Pass
Declared WRITE
→ Inferred WRITE
install.sh:写入配置到/tmp; apply-qqbot-patch.sh:覆盖插件ts文件 Shell Pass
Declared WRITE
→ Inferred WRITE
apply-qqbot-patch.sh:通过sed注入execSync到TypeScript; scripts/*.sh:使用subprocess调用 Environment Pass
Declared WRITE
→ Inferred WRITE
install.sh:配置systemd服务和crontab Network Pass
Declared NONE
→ Inferred NONE
smart-status-report.sh:仅使用openclaw内部命令 Skill Invoke Pass
Declared NONE
→ Inferred NONE
无动态skill调用 Browser Pass
Declared NONE
→ Inferred NONE
无浏览器操作 Database Pass
Declared NONE
→ Inferred NONE
无数据库操作
Suspicious artifacts and egress
Medium External URL
https://clawhub.ai/user/fanxinyun1991 skill-card.md:9
Medium External URL
https://clawhub.ai/fanxinyun1991/skills/agent-guardian skill-card.md:39
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
| langdetect | * | pip | No | 无版本锁定,建议锁定为 1.0.9 |
| inotify-tools | * | apt | No | apt-get 安装,系统包风险低 |
File composition
15 files · 1269 lines Shell 7 files · 567 linesMarkdown 4 files · 412 linesPython 3 files · 285 linesJSON 1 files · 5 lines
Files of concern · 4
scripts/install.sh Shell · 132 lines
systemd 服务以 root 身份持久化运行 · langdetect 依赖无版本锁定 · install.sh 需要 root 权限
scripts/apply-qqbot-patch.sh Shell · 93 lines
apply-qqbot-patch.sh 通过 sed 注入 execSync 修改第三方插件
scripts/supervisor.sh Shell · 142 lines
状态文件存于 /tmp 共享目录
skill-card.md Markdown · 59 lines
https://clawhub.ai/user/fanxinyun1991 · https://clawhub.ai/fanxinyun1991/skills/agent-guardian
Other files · msg-queue.py · SKILL.md · qqbot.md · lang-filter.py · generic.md · status-query-daemon.sh +2
15 files · 42.1 KB · 1269 lines
Shell 7f · 567LMarkdown 4f · 412LPython 3f · 285LJSON 1f · 5L
├─
▾
📁
references
│ └─
▾
📁
patches
│ ├─
📝
generic.md
Markdown
86L · 2.9 KB
│ └─
📝
qqbot.md
Markdown
132L · 3.8 KB
├─
▾
📁
scripts
│ ├─
🔧
apply-qqbot-patch.sh
Shell
93L · 4.2 KB
│ ├─
🐍
detect-language.py
Python
60L · 1.7 KB
│ ├─
🔧
install.sh
Shell
132L · 4.4 KB
│ ├─
🐍
lang-filter.py
Python
89L · 3.2 KB
│ ├─
🐍
msg-queue.py
Python
136L · 4.9 KB
│ ├─
🔧
reset-work-state.sh
Shell
22L · 516 B
│ ├─
🔧
smart-status-report.sh
Shell
56L · 1.9 KB
│ ├─
🔧
status-query-daemon.sh
Shell
70L · 2.2 KB
│ ├─
🔧
supervisor.sh
Shell
142L · 3.8 KB
│ └─
🔧
update-work-state.sh
Shell
52L · 1.3 KB
├─
📝
SKILL.md
Markdown
135L · 4.8 KB
├─
📋
_meta.json
JSON
5L · 133 B
└─
📝
skill-card.md
Markdown
59L · 2.4 KB
Security positives
功能声明与代码实现基本一致,无明显影子功能
skill-card.md 主动披露了已知的持久化和代码执行风险
无凭证收割、无数据外泄、无外部网络通信
补丁代码使用了 JSON.stringify 防止命令注入
语言过滤逻辑清晰,无隐蔽行为
状态管理完全在 /tmp 本地,无外传