GatewayStack Governance
Deny-by-default governance for every tool call in OpenClaw.
Five core checks run automatically on every invocation:
- 1. Identity — maps the agent to a policy role. Unknown agents are denied.
- Scope — deny-by-default tool allowlist. Unlisted tools are blocked.
- Rate limiting — per-user and per-session sliding window limits.
- Injection detection — 40+ patterns from Cisco, Snyk, and Kaspersky research.
- Audit logging — every decision recorded to append-only JSONL.
Three opt-in features extend governance further:
- 6. Output DLP — scans tool output for PII using
@gatewaystack/transformabl-core. Log or redact. - Escalation — human-in-the-loop review for medium-severity detections and first-time tool use.
- Behavioral monitoring — detects anomalous tool usage patterns using
@gatewaystack/limitabl-core.
Install
CODEBLOCK0
One command. Zero config. The core 5 checks are active on every tool call immediately.
The plugin hooks into before_tool_call at the process level — the agent can't bypass it, skip it, or talk its way around it.
Customize
To override the defaults, create a policy file:
CODEBLOCK1
Configure which tools are allowed, who can use them, rate limits, injection detection sensitivity, and the three optional features (DLP, escalation, behavioral monitoring — all disabled by default).
Optional GatewayStack packages
The opt-in features use GatewayStack packages via lazy import. Install only what you need:
CODEBLOCK2
The core 5 checks have zero external dependencies and work without these packages.
Links
- - GitHub — source, docs, getting started guide
- npm — package registry
- MIT licensed
技能名称: gatewaystack-governance
详细描述:
GatewayStack 治理
对 OpenClaw 中每一次工具调用实施默认拒绝的治理策略。
每次调用自动执行五项核心检查:
- 1. 身份 — 将代理映射到策略角色。未知代理将被拒绝。
- 范围 — 默认拒绝的工具白名单。未列出的工具将被阻止。
- 速率限制 — 基于用户和会话的滑动窗口限制。
- 注入检测 — 来自 Cisco、Snyk 和 Kaspersky 研究的 40 多种模式。
- 审计日志 — 每次决策记录到仅追加的 JSONL 文件中。
三个可选功能进一步扩展治理:
- 6. 输出 DLP — 使用 @gatewaystack/transformabl-core 扫描工具输出中的 PII。可记录或编辑。
- 升级 — 对中等严重性检测和首次工具使用进行人工审核。
- 行为监控 — 使用 @gatewaystack/limitabl-core 检测异常工具使用模式。
安装
bash
openclaw plugins install @gatewaystack/gatewaystack-governance
一条命令。零配置。核心五项检查立即在每次工具调用中生效。
该插件在进程级别挂钩 beforetoolcall — 代理无法绕过、跳过或通过对话规避它。
自定义
要覆盖默认设置,请创建策略文件:
bash
cp ~/.openclaw/plugins/gatewaystack-governance/policy.example.json \
~/.openclaw/plugins/gatewaystack-governance/policy.json
配置允许哪些工具、谁可以使用它们、速率限制、注入检测灵敏度以及三个可选功能(DLP、升级、行为监控 — 默认全部禁用)。
可选的 GatewayStack 包
可选功能通过延迟导入使用 GatewayStack 包。仅安装你需要的:
bash
npm install @gatewaystack/transformabl-core # 用于输出 DLP
npm install @gatewaystack/limitabl-core # 用于行为监控
核心五项检查没有外部依赖,无需这些包即可工作。
链接