Scan Report
This report was generated in Chinese. Some content may be in Chinese.
30 /100
agent-runtime
智能体运行时系统。整合工具注册、权限控制、Hook拦截、上下文压缩、Usage追踪的完整Agent运行时。
Agent Runtime 框架代码本身无恶意行为,但存在文档-行为不一致(未声明的内置工具)属于轻微阴影功能,以及权限控制在 SKILL.md 中被强调但实现为直接允许(简化版)。
Safe to install
建议补充 SKILL.md 中的 allowed-tools 声明和内置工具列表(read_file、bash、search、todo),并完善权限控制实现(非仅简化允许)。
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Medium | 内置工具未在文档中声明 Doc Mismatch | scripts/agent-runtime.mjs:137 |
| Medium | 权限控制实现为空壳 Priv Escalation | scripts/agent-runtime.mjs:94 |
| Low | bash 工具未声明且权限较高 Priv Escalation | scripts/agent-runtime.mjs:153 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Filesystem | NONE | READ | ✗ Violation | scripts/agent-runtime.mjs:143 内置 read_file 工具调用 fs.readFileSync |
| Shell | NONE | WRITE | ✗ Violation | scripts/agent-runtime.mjs:157 内置 bash 工具使用 spawn('cmd', ['/C', command], {shell:… |
| Skill Invoke | NONE | WRITE | ✗ Violation | scripts/agent-runtime.mjs:155 动态 import('child_process') |
File Tree
2 files · 17.1 KB · 610 lines JavaScript 1f · 508L
Markdown 1f · 102L
├─
▾
scripts
│ └─
agent-runtime.mjs
JavaScript
└─
SKILL.md
Markdown
Security Positives
✓ 代码本身无恶意行为(无数据外泄、无凭证收割、无反向shell、无持久化)
✓ 框架架构清晰,有合理的组件分离(Registry/Hook/Compactor/Tracker)
✓ 无外部网络请求,无敏感路径硬编码
✓ Usage Tracker 和 Session Compactor 实现合理