Moltguard zh

From L-LesterYu/OpenClaw-hot-skills-zh · View interactive version

Moltguard zh is an AI agent skill from the GitHub repository L-LesterYu/OpenClaw-hot-skills-zh. OpenClaw 原生安全插件——通过 MoltGuard API 检测工具结果与消息中的提示注入,可选本地净化网关在发送前脱敏 PII(银行卡/密码等),首次使用自动注册 API 密钥

How to use this skill

Skill file

MoltGuard 安全防护

OpenClaw 原生安全插件,检测和防止提示注入攻击

🛡️ 功能特性

🚀 快速开始

基本配置

启用基本防护:

{
  "enabled": true
}

启用本地净化网关

{
  "enabled": true,
  "sanitizePrompt": true,
  "gatewayAutoStart": true
}

⚙️ 配置选项

| 参数 | 类型 | 默认值 | 描述 |

|------|------|--------|------|

| enabled | boolean | true | 启用或禁用防护 |

| sanitizePrompt | boolean | false | 启用本地提示词净化网关 |

| gatewayPort | number | 8900 | 本地净化网关端口 |

| gatewayAutoStart | boolean | true | 插件加载时自动启动网关 |

| blockOnRisk | boolean | true | 检测到注入时拦截工具调用 |

| apiKey | string | - | MoltGuard API 密钥(可选) |

| timeoutMs | number | 60000 | 分析超时时间(毫秒) |

| autoRegister | boolean | true | apiKey 为空时自动注册 API 密钥 |

| apiBaseUrl | string | https://api.moltguard.com | MoltGuard API 基础 URL |

🔍 工作原理

1. 检测模式

2. 净化模式(可选)

🛡️ 安全特性

防护机制

合规性

📊 使用建议

高安全性场景

{
  "enabled": true,
  "sanitizePrompt": true,
  "blockOnRisk": true,
  "logPath": "~/.openclaw/logs/security"
}

严格环境(无网络)

{
  "enabled": true,
  "sanitizePrompt": true,
  "autoRegister": false,
  "blockOnRisk": true
}

🔧 故障排除

常见问题

  1. API 密钥问题
  1. 网关启动失败
  1. 性能问题

📝 日志记录

所有安全事件都会记录到 JSONL 格式的日志文件中:

# 默认日志位置
~/.openclaw/logs/

# 查看日志
cat ~/.openclaw/logs/moltguard-*.jsonl | jq '.'

日志内容包括:


注意: MoltGuard 需要网络连接以进行 API 调用。在严格隔离的环境中,可仅使用本地净化功能。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.