Scan Report
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.
Safe to install
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.
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Medium | No allowed-tools declaration in SKILL.md Doc Mismatch | SKILL.md:1 |
| Medium | Unrestricted shell command execution from user config RCE | scripts/heartbeat.js:94 |
| Low | Full process environment inherited by child commands Priv Escalation | scripts/heartbeat.js:94 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Shell | NONE | WRITE | ✗ Violation | scripts/heartbeat.js:94 — execSync(check.command, { shell: true }) |
| Filesystem | NONE | WRITE | ✗ Violation | scripts/heartbeat.js:215 — fs.writeFileSync(path.resolve(outputPath), md) |
| Filesystem | NONE | READ | ✗ Violation | scripts/heartbeat.js:184 — fs.readFileSync(fullConfigPath, 'utf8') |
| Network | NONE | READ | ✗ Violation | Indirect via execSync running curl commands from config |
5 findings
Medium External URL 外部 URL
https://your-email-api/unread SKILL.md:25 Medium External URL 外部 URL
https://your-site.com SKILL.md:31 Medium External URL 外部 URL
https://your-logger.workers.dev/messages?unread=true SKILL.md:93 Medium External URL 外部 URL
https://email-api.example.com/inbox references/config.md:72 Medium External URL 外部 URL
https://logger.example.com/messages?unread=true references/config.md:84 File Tree
3 files · 19.0 KB · 615 lines JavaScript 1f · 381L
Markdown 2f · 234L
├─
▾
references
│ └─
config.md
Markdown
├─
▾
scripts
│ └─
heartbeat.js
JavaScript
└─
SKILL.md
Markdown
Security Positives
✓ 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