Low Risk — Risk Score 10/100
Last scan:10 hr ago Rescan
10 /100
memory-harness
Runtime-enforced memory harness for OpenClaw. Implements 3-stage recall (session preflight, triggered recall, pre-execution gate) with intent classification, entity detection, memory compression, and status tracking.
Memory Harness 是一个纯本地内存管理工具,代码行为与文档描述基本一致,未发现恶意行为或数据外泄风险。存在轻微文档-实现不一致(shell脚本vs JS文件)和代码质量问题。
Skill Namememory-harness
Duration57.0s
Enginepi
Safe to install
建议修复 intent-classifier.js 中的语法错误,统一文档中提到的脚本类型(.sh vs .js),但当前代码可安全使用。

Findings 3 items

Severity Finding Location
Low
文档与实现脚本类型不一致 Doc Mismatch
SKILL.md 描述使用 .sh 脚本(session-preflight.sh、targeted-recall.sh 等),但实际仓库仅包含 .js 文件。这可能误导用户对能力的预期。
### session-preflight.sh
### targeted-recall.sh
### pre-execution-gate.sh
### writeback.sh
→ 统一文档与实现,或说明 JS 脚本替代了 shell 脚本
SKILL.md:98
Low
intent-classifier.js 存在语法错误和不完整代码 code_quality
文件中包含大量语法错误(缺少逗号、括号不匹配、不完整的函数定义),以及看起来像测试代码的片段(JSON字符串作为正则)。这些代码不会被执行,但影响代码质量。
const CASual_PATTERNS = [ /^.{1,10}$/, /^(test|テスト)$/i /^(ok|okです|okです)$/i ]);
→ 清理死代码和语法错误
scripts/intent-classifier.js:50
Info
pre-execution-gate.js 包含安全检查逻辑 positive
该脚本检测危险操作模式(rm -rf, eval, exec, child_process),这是有益的安全功能。
const dangerousPatterns = [ /\brm\s+-rf/, /\bdrop\s+table/i, /\bdelete\s+from/i, /eval\s*\(/, /exec\s*\(/, /child_process/ ]
→ 保持此安全检查功能
scripts/pre-execution-gate.js:45
ResourceDeclaredInferredStatusEvidence
Filesystem READ READ ✓ Aligned 代码仅读取自身目录下的JS文件
Shell NONE NONE 仅使用 execFileSync 调用本地 node 脚本
Network NONE NONE 无任何网络请求代码
Environment NONE NONE 无环境变量访问
Skill Invoke NONE NONE 无外部技能调用

File Tree

10 files · 24.0 KB · 1031 lines
JavaScript 8f · 579L Markdown 2f · 452L
├─ 📁 scripts
│ ├─ 📜 entity-detector.js JavaScript 73L · 1.8 KB
│ ├─ 📜 harness.js JavaScript 75L · 1.9 KB
│ ├─ 📜 intent-classifier.js JavaScript 152L · 3.1 KB
│ ├─ 📜 memory-compress.js JavaScript 37L · 830 B
│ ├─ 📜 pre-execution-gate.js JavaScript 113L · 3.1 KB
│ ├─ 📜 should-recall.js JavaScript 57L · 1.3 KB
│ ├─ 📜 structured-log.js JavaScript 28L · 761 B
│ └─ 📜 targeted-recall.js JavaScript 44L · 1.0 KB
├─ 📝 readme.md Markdown 226L · 5.1 KB
└─ 📝 SKILL.md Markdown 226L · 5.1 KB

Security Positives

✓ 无网络请求或数据外泄
✓ 无凭证收割或敏感文件访问
✓ 无 shell 命令执行或 RCE 风险
✓ pre-execution-gate.js 包含安全检查功能
✓ 内存压缩限制为5项,防止信息过载
✓ 代码均为纯本地处理