扫描报告
20 /100
agent-heartbeat
Unified heartbeat system for OpenClaw agents. Runs parallel health checks, data collectors, and state monitors in one command.
This is a legitimate heartbeat monitoring tool that executes user-defined shell commands from a config file — its core functionality is documented and intentional, but the SKILL.md lacks an allowed-tools declaration, making its shell:WRITE capability undeclared.
可以安装
Add an allowed-tools declaration to SKILL.md explicitly listing shell:WRITE and filesystem:READ/WRITE. Document that the skill runs arbitrary user-supplied commands from heartbeat.yaml via execSync. Consider adding a --sandbox flag or restricting commands to an allowlist if untrusted configs may be used.
安全发现 3 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 中危 | No allowed-tools declaration in SKILL.md 文档欺骗 | SKILL.md:1 |
| 中危 | Unrestricted shell command execution from user config 代码执行 | scripts/heartbeat.js:94 |
| 低危 | Full process environment inherited by child commands 权限提升 | scripts/heartbeat.js:94 |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 命令执行 | NONE | WRITE | ✗ 越权 | scripts/heartbeat.js:94 — execSync(check.command, { shell: true }) |
| 文件系统 | NONE | WRITE | ✗ 越权 | scripts/heartbeat.js:215 — fs.writeFileSync(path.resolve(outputPath), md) |
| 文件系统 | NONE | READ | ✗ 越权 | scripts/heartbeat.js:184 — fs.readFileSync(fullConfigPath, 'utf8') |
| 网络访问 | NONE | READ | ✗ 越权 | Indirect via execSync running curl commands from config |
5 项发现
中危 外部 URL 外部 URL
https://your-email-api/unread SKILL.md:25 中危 外部 URL 外部 URL
https://your-site.com SKILL.md:31 中危 外部 URL 外部 URL
https://your-logger.workers.dev/messages?unread=true SKILL.md:93 中危 外部 URL 外部 URL
https://email-api.example.com/inbox references/config.md:72 中危 外部 URL 外部 URL
https://logger.example.com/messages?unread=true references/config.md:84 目录结构
3 文件 · 19.0 KB · 615 行 JavaScript 1f · 381L
Markdown 2f · 234L
├─
▾
references
│ └─
config.md
Markdown
├─
▾
scripts
│ └─
heartbeat.js
JavaScript
└─
SKILL.md
Markdown
安全亮点
✓ No base64-encoded payloads or obfuscated code found
✓ No hardcoded credentials, API keys, or tokens in the codebase
✓ No C2 communication, reverse shells, or data exfiltration endpoints
✓ No sensitive file access (no ~/.ssh, ~/.aws, .env reads attempted)
✓ No supply chain risks — no external dependencies required (yaml parser has a fallback)
✓ Configuration-driven design means commands are visible and user-controlled
✓ No prompt injection, no hidden instructions in comments
✓ Timeout enforcement on all child commands prevents indefinite hangs
✓ Documentation is thorough and matches code behavior