← 返回
安全合规 中文

Openclaw Snitch

Multi-layer blocklist guard for OpenClaw. Hard-blocks tool calls matching banned patterns, injects a security directive at agent bootstrap, warns on incoming...
用于OpenClaw的多层黑名单防护。硬拦截匹配禁用模式的工具调用,在代理启动时注入安全指令,并对传入...进行警告。
rgr4y
安全合规 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 1
Stars
📥 728
下载
💾 3
安装
1
版本
#latest

概述

openclaw-snitch

A configurable blocklist guard for OpenClaw with three enforcement layers:

  1. Bootstrap directive — injects a security policy into every agent context
  2. Message warning — flags incoming messages referencing blocked terms
  3. Hard block — intercepts and kills the tool call + broadcasts a Telegram alert

Install

Hooks (bootstrap + message guard)

After installing this skill, copy the hook directories into your workspace:

cp -r ~/.openclaw/workspace/skills/openclaw-snitch/hooks/snitch-bootstrap ~/.openclaw/hooks/snitch-bootstrap
cp -r ~/.openclaw/workspace/skills/openclaw-snitch/hooks/snitch-message-guard ~/.openclaw/hooks/snitch-message-guard

Then enable them in openclaw.json:

{
  "hooks": {
    "snitch-bootstrap": { "enabled": true },
    "snitch-message-guard": { "enabled": true }
  }
}

Plugin (hard block + Telegram alert)

For the hard enforcement layer, install the npm package:

npm install -g openclaw-snitch

Then add to openclaw.json:

{
  "plugins": {
    "allow": ["openclaw-snitch"]
  }
}

Lock down the plugin files after install so the agent can't self-modify:

chmod -R a-w ~/.openclaw/extensions/openclaw-snitch

Configuration

In openclaw.json under plugins.config.openclaw-snitch:

{
  "plugins": {
    "config": {
      "openclaw-snitch": {
        "blocklist": ["clawhub", "clawdhub"],
        "alertTelegram": true,
        "bootstrapDirective": true
      }
    }
  }
}
KeyDefaultDescription
---------------------------
blocklist["clawhub", "clawdhub"]Terms to block (case-insensitive word boundary match)
alertTelegramtrueBroadcast Telegram alert to all allowFrom IDs on block
bootstrapDirectivetrueInject security directive into every agent bootstrap context

Hook blocklist (env var)

The hooks read SNITCH_BLOCKLIST (comma-separated) if set, otherwise fall back to the defaults:

SNITCH_BLOCKLIST=clawhub,clawdhub,myothertool

What gets blocked

Blocks fire when the tool name or tool parameters contain a blocked term. This catches cases where an agent tries to invoke a blocked tool indirectly (e.g. exec with clawhub install in the args).

Security notes

  • The hooks in ~/.openclaw/hooks/ load unconditionally — most tamper-resistant layer
  • The plugin layer requires plugins.allow — if an agent edits openclaw.json, hooks remain active
  • chown root:root on the extension dir prevents the agent from self-modifying the plugin

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-30 00:10 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,164
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,604
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,714