👁️ Anomaly Watcher — 行为异常监控
v1.0.0为OpenClaw代理持续监控行为,检测命令执行模式、资源消耗和技能调用中的异常偏离。
0· 60·0 当前·0 累计
安全扫描
OpenClaw
可疑
medium confidence技能代码和指令与其声明的监控目的基本一致,但指示大量日志记录(包括用户提示和令牌/交互指标),声称具备通知行为和'无网络访问',这些功能并未始终如一地实现,且可能在没有保护措施的情况下将敏感数据收集到本地文件中。
评估建议
该技能基本实现其名称所声称的功能,但它会将详细遥测数据(包括用户提示和令牌/交互指标)持久化到 .security/ 文件中。在安装前:1) 确认是否接受本地磁盘记录提示和交互指标的做法,这些可能包含敏感信息;2) 若继续,确保 .security 目录具有严格的文件系统权限,并排除在备份/远程遥测之外;3) 在提供 recordMetric 事件的源头要求提示/个人身份信息脱敏(或修改技能在写入前进行脱敏);4) 验证'通知人类'的实现方式(SKILL.md 提及通知但代码仅限本地);确认截断部分文件中没有隐藏的网络调用;5) 预期基线校准需要约48小时的安全、代表性数据;首先在非生产环境中测试。如需帮助,请联系作者添加:明确脱敏、要求人工批准/确认钩子用于基线重置和通知、准确记录将被记录的事件字段。...详细分析 ▾
ℹ 用途与能力
名称/描述与代码和SKILL.md一致:技能收集指标、计算基线并标记异常。然而,SKILL.md承诺钩子集成(PostToolUse、UserPromptSubmit、PostSkillExecution)和'无网络访问',同时又说会'通过首选渠道通知人类'——功能不匹配。指标集(包括用户提示、令牌、内存写入)对于异常监控器来说是合理的,但比最小监控器更广泛且更敏感。
⚠ 指令范围
指令和代码将详细遥测写入 .security/*(metrics.jsonl、anomalies.jsonl、false-positives.jsonl)。SKILL.md 明确列出记录 UserPromptSubmit(用户输入模式)和令牌消耗——这些可能包含敏感密钥。代码公开了一个通用的 recordMetric API,将存储调用者提供的任意'details',因此集成可能导致敏感提示内容或凭据被持久化。SKILL.md 还声称有护栏(只读、基线重置需要人工批准)和通知行为,但提供的代码并未完全强制执行或实现。
✓ 安装机制
没有安装规范和外部下载;技能仅作为代码文件交付,依赖标准 Node fs/path。这比远程安装程序风险更低。没有异常二进制文件或安装操作。
ℹ 凭证需求
技能不请求环境变量或凭据(良好)。然而,它设计用于记录可能泄露密钥的指标,如'令牌消耗'和'用户提示';缺乏明确的脱敏或排除规则意味着没有 env/凭据请求并不能消除通过事件捕获敏感数据的风险。
✓ 持久化与权限
always 为 false,技能不请求系统级配置或其他技能的密钥。它仅在 targetDir/.security 下写入文件,该目录受限但在磁盘上持久化。技能似乎不会修改其他技能或全局代理设置。
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/4/4
anomaly-watcher 初始版本:OpenClaw 代理的持续行为监控。建立关键代理指标的滚动行为基线(命令、文件、网络、技能等)。使用与7天平均值的统计偏差来检测和分类异常。根据严重程度(NORMAL、ELEVATED、ANOMALOUS、CRITICAL)记录和升级警报。监控已知攻击特征(侦察、横向移动、权限维持)。严格只读:从不修改代理行为或需要网络访问。
● Pending
安装命令 点击复制
官方npx clawhub@latest install anomaly-watcher
镜像加速npx clawhub@latest install anomaly-watcher --registry https://cn.clawhub-mirror.com
技能文档
Purpose
Establish a behavioral baseline for the agent and continuously monitor for deviations that may indicate compromise, misconfiguration, or abuse.
Integration
Always-on monitoring via hooks:
PostToolUse— log every tool invocationUserPromptSubmit— log input patternsPostSkillExecution— log skill results
Monitored Metrics
| Metric | Baseline Unit | Alert Threshold |
|---|---|---|
| Command exec frequency | per hour | >2σ from 7-day avg |
| File access patterns | unique paths/hour | >2σ |
| Network request volume | requests/hour | >2σ |
| Skill invocation frequency | per skill per hour | >2σ |
| Token consumption rate | tokens/hour | >2σ |
| Error rate | errors/hour | >2σ |
| Memory write patterns | writes/hour | >2σ |
| Cross-session messages | messages/hour | >2σ |
| New file creation rate | files/hour | >2σ |
| Unique external domains | domains/hour | >2σ |
Anomaly Detection Algorithm
- Collect — append each action to
.security/baseline/metrics.jsonl - Baseline — rolling 7-day average and standard deviation per metric
- Compare — current window (1 hour) vs baseline
- Classify:
NORMAL — within 1σ
- ELEVATED — between 1σ and 2σ
- ANOMALOUS — between 2σ and 3σ
- CRITICAL — above 3σ or matches known attack signature
- Alert — based on classification
Alert Actions
| Classification | Action |
|---|---|
| NORMAL | No action |
| ELEVATED | Log to anomaly.jsonl |
| ANOMALOUS | Log + notify human via preferred channel |
| CRITICAL | Log + notify + recommend pause (human decides) |
Known Attack Signatures
- Sudden spike in file reads across many directories → possible reconnaissance
- Outbound to new external domain + high data volume → possible exfiltration
- Rapid skill installs from ClawHub → possible supply chain attack
- Memory writes with encoded content → possible persistence attempt
Guardrails
- Monitoring is strictly read-only — never modifies agent behavior
- Baseline calibration requires minimum 48 hours of data
- False positives are tracked in
.security/false-positives.jsonl - Baseline resets require human approval
- The watcher itself has no network access (local analysis only)
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制