This report was generated in Chinese. Some content may be in Chinese.
Low Risk — Risk Score 30/100
Last scan:5 hr ago Rescan
30 /100
gateway-monitor-installer
Install, update, run, and remove OpenClaw Gateway Monitor + Gateway Watchdog on macOS via LaunchAgent
功能完整的 OpenClaw Gateway 监控安装工具,安装逻辑清晰、无恶意行为,但存在文档-实现差异(未声明 API 服务器和配置恢复功能)及 restore-config 端点可修改系统配置的隐患。
Skill Namegateway-monitor-installer
Duration64.5s
Enginepi
ClawHub Gateway Monitor Installer v1.0.0 by yes999zc
📥 173
ClawHub Verdict Suspicious dangerous_execenv_credential_accessllm_suspiciouspotential_exfiltrationvt_suspicious
Safe to install
建议补全 SKILL.md 文档声明 API 服务器功能;考虑对 /api/restore-config 添加额外鉴权或限制访问来源。整体可用于生产环境,但需注意本地网络暴露风险。

Findings 4 items

Severity Finding Location
Medium
SKILL.md 未声明 API 服务器功能 Doc Mismatch
SKILL.md 仅描述 install/uninstall/update 功能,但 gateway-monitor-server.js 实现完整的本地 API 服务器(监听 18990 端口),提供日志流、网关状态、会话上下文等 API 端点,属于明显的文档-行为差异。
Install, update, run, and remove OpenClaw Gateway Monitor
→ 补全 SKILL.md 文档,声明实际包含的 API 服务器和所有端点功能。
SKILL.md:1
Medium
/api/restore-config 可修改系统配置文件 Priv Escalation
restore-config 端点允许通过 GET ?confirm=true 覆盖 ~/.openclaw/openclaw.json。虽然仅限于备份文件,但攻击者(如 XSS、本地网络窃听)可触发配置恢复,可能影响 Gateway 行为。
fs.copyFileSync(backupPath, openclawJsonPath)
→ 添加额外鉴权(如会话 token 检查)或限制为 localhost 来源。
assets/bin/gateway-monitor-server.js:580
Low
读取 MiniMax 凭证配置文件 Sensitive Access
代码从 ~/.openclaw/agents/main/agent/auth-profiles.json 读取 API key 用于外部请求。凭证仅发送至 minimaxi.com,但端点响应中 keyMasked 会暴露脱敏 key。
fs.readFileSync(MINIMAX_AUTH_PROFILE_PATH, 'utf8')
→ 确保本地 API 仅限受信任应用访问;考虑不在 API 响应中返回 keyMasked。
assets/bin/gateway-monitor-server.js:215
Low
API 服务器监听 0.0.0.0 扩展攻击面 Priv Escalation
gateway-monitor-server.js 绑定 0.0.0.0:18990 而非 127.0.0.1,使同一网络内其他设备可访问本地 API。
server.listen(PORT, '0.0.0.0')
→ 考虑绑定 127.0.0.1 限制为本地访问,除非需要远程监控。
assets/bin/gateway-monitor-server.js:700
ResourceDeclaredInferredStatusEvidence
Filesystem WRITE WRITE ✓ Aligned install.sh:22-24, gateway-monitor-server.js:restore-config
Shell WRITE WRITE ✓ Aligned install.sh:50-54 launchctl commands
Network NONE READ ✗ Violation gateway-monitor-server.js:MINIMAX_REMAINS_URL fetch
Environment NONE READ ✗ Violation gateway-monitor-server.js:MINIMAX_CP_KEY env read
credential NONE READ ✗ Violation gateway-monitor-server.js:MINIMAX_AUTH_PROFILE_PATH read
3 findings
🔗
Medium External URL 外部 URL
http://127.0.0.1:18990
SKILL.md:40
🔗
Medium External URL 外部 URL
https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains
assets/bin/gateway-monitor-server.js:28
🔗
Medium External URL 外部 URL
http://127.0.0.1:18990/api/summary
scripts/status.sh:25

File Tree

6 files · 42.9 KB · 1527 lines
JavaScript 1f · 1321L Shell 4f · 159L Markdown 1f · 47L
├─ 📁 assets
│ └─ 📁 bin
│ ├─ 📜 gateway-monitor-server.js JavaScript 1321L · 36.9 KB
│ └─ 🔧 gateway-watchdog.sh Shell 33L · 1.5 KB
├─ 📁 scripts
│ ├─ 🔧 install.sh Shell 69L · 1.9 KB
│ ├─ 🔧 status.sh Shell 28L · 706 B
│ └─ 🔧 uninstall.sh Shell 29L · 732 B
└─ 📝 SKILL.md Markdown 47L · 1.2 KB

Security Positives

✓ 代码结构清晰,无混淆或隐藏执行逻辑
✓ 无 base64 编码、eval() 动态执行或反向 shell 等高危指标
✓ launchctl 操作符合 macOS 系统管理规范
✓ restore-config 仅操作备份文件,降低破坏风险
✓ maskKey() 函数对 API key 进行脱敏处理
✓ 包含完整的错误处理和超时机制
✓ 使用 set -euo pipefail 强化 Shell 脚本安全性