扫描报告
25 /100
openclaw-mobile-gateway-installer
Installs and manages OpenClaw mobile gateway as a systemd service. Provides a mobile-friendly HTTP API for managing models, channels, agents, skills, routing, healing policies, and chat sessions.
A legitimate gateway installer that performs standard deployment operations (systemd service management, npm install, Express HTTP server) but fails to declare its shell and filesystem WRITE capabilities in SKILL.md, creating a doc-to-code mismatch. The pre-scan's critical IOC flag on uninstall.sh line 11 is a false positive — the actual command is `sudo rm -rf "${INSTALL_DIR}"` with INSTALL_DIR defaulted to a scoped path, not a root-destroying `rm -rf /`.
可以安装
Add explicit capability declarations to SKILL.md: declare shell:WRITE for systemctl/journalctl/openclaw CLI invocations, filesystem:WRITE for service/unit file creation, and network:READ for health probing. Consider narrowing the uninstall script's rm -rf scope to individual subdirectories instead of the top-level install directory to prevent accidental data loss.
安全发现 7 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 中危 | Shell execution capability not declared in SKILL.md 文档欺骗 | services.ts:1 |
| 中危 | Network access not declared in SKILL.md 文档欺骗 | store.ts:12 |
| 中危 | Install script writes to system directories without declaration 权限提升 | install.sh:40 |
| 中危 | Sensitive configuration file access without declaration 敏感访问 | services.ts:19 |
| 低危 | Installs a systemd service for persistence 持久化 | install.sh:62 |
| 低危 | npm install without lockfile enforcement 供应链 | install.sh:35 |
| 低危 | Uninstall script rm -rf scoped but lacks per-file safety 文档欺骗 | uninstall.sh:11 |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 命令执行 | NONE | WRITE | ✗ 越权 | services.ts:execFileSync systemctl/journalctl; install.sh:systemctl/nm; check.sh… |
| 文件系统 | NONE | WRITE | ✗ 越权 | install.sh:mkdir/tee to /etc/systemd and /etc/openclaw-mobile-gateway |
| 网络访问 | READ | READ | ✓ 一致 | services.ts:fetch() probing OpenClaw targets; read-only probing documented |
| 环境变量 | NONE | READ | ✗ 越权 | services.ts:process.env.OPENCLAW_* reads; install.sh env propagation |
| 技能调用 | NONE | NONE | — | No skill_invoke detected |
| 剪贴板 | NONE | NONE | — | No clipboard access detected |
| 浏览器 | NONE | NONE | — | No browser access detected |
| 数据库 | NONE | NONE | — | No database access detected |
1 严重 8 项发现
严重 危险命令 危险 Shell 命令
rm -rf / uninstall.sh:11 中危 外部 URL 外部 URL
https://openclaw.example.com README.md:15 中危 外部 URL 外部 URL
https://openclaws.example.com SKILL.md:29 中危 外部 URL 外部 URL
http://127.0.0.1:4800/health SKILL.md:47 中危 外部 URL 外部 URL
https://alpha.openclaw.local/api backend/src/store.ts:12 中危 外部 URL 外部 URL
https://beta.openclaw.local/api backend/src/store.ts:20 中危 外部 URL 外部 URL
https://prod.openclaw.local/api backend/src/store.ts:28 中危 外部 URL 外部 URL
https://openclaws.gdcp.edu.cn backend/src/store.ts:36 目录结构
14 文件 · 93.4 KB · 3230 行 TypeScript 7f · 2954L
Shell 3f · 131L
Markdown 2f · 95L
JSON 2f · 50L
├─
▾
backend
│ ├─
▾
src
│ │ ├─
app.ts
TypeScript
│ │ ├─
index.ts
TypeScript
│ │ ├─
schemas.ts
TypeScript
│ │ ├─
services.ts
TypeScript
│ │ ├─
store.ts
TypeScript
│ │ ├─
types.ts
TypeScript
│ │ └─
utils.ts
TypeScript
│ ├─
package.json
JSON
│ └─
tsconfig.json
JSON
├─
check.sh
Shell
├─
install.sh
Shell
├─
README.md
Markdown
├─
SKILL.md
Markdown
└─
uninstall.sh
Shell
依赖分析 4 项
| 包名 | 版本 | 来源 | 已知漏洞 | 备注 |
|---|---|---|---|---|
express | ^4.19.2 | npm | 否 | Caret range; last stable minor version |
cors | ^2.8.5 | npm | 否 | Well-maintained middleware |
zod | ^3.23.8 | npm | 否 | Schema validation library; pinned |
tsx | ^4.16.2 | npm | 否 | devDependency only; unpinned major version |
安全亮点
✓ No credential harvesting or exfiltration detected — API keys from config are loaded for model routing only and remain local
✓ No obfuscation or base64-encoded payloads found in the codebase
✓ No reverse shell, C2 communication, or data theft patterns observed
✓ All shell executions (systemctl, journalctl, openclaw CLI) are for legitimate deployment and service management
✓ Input validation via Zod schemas prevents injection attacks on all HTTP API endpoints
✓ Token generation uses crypto.randomBytes for secure random token values
✓ Dependency versions are reasonably pinned (express ^4.19.2, zod ^3.23.8, cors ^2.8.5)
✓ No curl|bash or wget|sh remote script execution patterns
✓ uninstall.sh does NOT contain 'rm -rf /' — the pre-scan IOC was a false positive; actual command is scoped to ${INSTALL_DIR}
✓ The skill's actual functionality matches its described purpose as a gateway installer