@congzhen/changewayguard 6.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +270 -0
- package/dashboard-dist/api/104.index.js +1420 -0
- package/dashboard-dist/api/104.index.js.map +1 -0
- package/dashboard-dist/api/113.index.js +496 -0
- package/dashboard-dist/api/113.index.js.map +1 -0
- package/dashboard-dist/api/18.index.js +67 -0
- package/dashboard-dist/api/18.index.js.map +1 -0
- package/dashboard-dist/api/217.index.js +44 -0
- package/dashboard-dist/api/217.index.js.map +1 -0
- package/dashboard-dist/api/222.index.js +90 -0
- package/dashboard-dist/api/222.index.js.map +1 -0
- package/dashboard-dist/api/25.index.js +3562 -0
- package/dashboard-dist/api/25.index.js.map +1 -0
- package/dashboard-dist/api/280.index.js +206 -0
- package/dashboard-dist/api/280.index.js.map +1 -0
- package/dashboard-dist/api/369.index.js +115 -0
- package/dashboard-dist/api/369.index.js.map +1 -0
- package/dashboard-dist/api/377.index.js +1176 -0
- package/dashboard-dist/api/377.index.js.map +1 -0
- package/dashboard-dist/api/411.index.js +4250 -0
- package/dashboard-dist/api/411.index.js.map +1 -0
- package/dashboard-dist/api/424.index.js +135 -0
- package/dashboard-dist/api/424.index.js.map +1 -0
- package/dashboard-dist/api/573.index.js +806 -0
- package/dashboard-dist/api/573.index.js.map +1 -0
- package/dashboard-dist/api/598.index.js +328 -0
- package/dashboard-dist/api/598.index.js.map +1 -0
- package/dashboard-dist/api/62.index.js +4151 -0
- package/dashboard-dist/api/62.index.js.map +1 -0
- package/dashboard-dist/api/67.index.js +23383 -0
- package/dashboard-dist/api/67.index.js.map +1 -0
- package/dashboard-dist/api/678.index.js +2734 -0
- package/dashboard-dist/api/678.index.js.map +1 -0
- package/dashboard-dist/api/698.index.js +1896 -0
- package/dashboard-dist/api/698.index.js.map +1 -0
- package/dashboard-dist/api/720.index.js +98 -0
- package/dashboard-dist/api/720.index.js.map +1 -0
- package/dashboard-dist/api/830.index.js +95 -0
- package/dashboard-dist/api/830.index.js.map +1 -0
- package/dashboard-dist/api/831.index.js +99 -0
- package/dashboard-dist/api/831.index.js.map +1 -0
- package/dashboard-dist/api/84.index.js +64 -0
- package/dashboard-dist/api/84.index.js.map +1 -0
- package/dashboard-dist/api/900.index.js +65 -0
- package/dashboard-dist/api/900.index.js.map +1 -0
- package/dashboard-dist/api/917.index.js +88 -0
- package/dashboard-dist/api/917.index.js.map +1 -0
- package/dashboard-dist/api/948.index.js +64 -0
- package/dashboard-dist/api/948.index.js.map +1 -0
- package/dashboard-dist/api/953.index.js +67 -0
- package/dashboard-dist/api/953.index.js.map +1 -0
- package/dashboard-dist/api/975.index.js +374 -0
- package/dashboard-dist/api/975.index.js.map +1 -0
- package/dashboard-dist/api/drizzle/sqlite/0000_short_captain_stacy.sql +70 -0
- package/dashboard-dist/api/drizzle/sqlite/0001_closed_magus.sql +10 -0
- package/dashboard-dist/api/drizzle/sqlite/0002_agent_capability_observation.sql +38 -0
- package/dashboard-dist/api/drizzle/sqlite/0003_auth_magic_link.sql +28 -0
- package/dashboard-dist/api/drizzle/sqlite/0004_static_scan_fields.sql +8 -0
- package/dashboard-dist/api/drizzle/sqlite/0005_gateway_activity.sql +24 -0
- package/dashboard-dist/api/drizzle/sqlite/0006_sour_marauders.sql +41 -0
- package/dashboard-dist/api/drizzle/sqlite/meta/0000_snapshot.json +460 -0
- package/dashboard-dist/api/drizzle/sqlite/meta/0001_snapshot.json +536 -0
- package/dashboard-dist/api/drizzle/sqlite/meta/0006_snapshot.json +1249 -0
- package/dashboard-dist/api/drizzle/sqlite/meta/_journal.json +55 -0
- package/dashboard-dist/api/index.js +27340 -0
- package/dashboard-dist/api/index.js.map +1 -0
- package/dashboard-dist/api/package.json +16 -0
- package/dashboard-dist/api/sourcemap-register.cjs +1 -0
- package/dashboard-dist/web/assets/index-CqWIeBTD.js +158 -0
- package/dashboard-dist/web/assets/index-Dw7--9q4.css +1 -0
- package/dashboard-dist/web/changeway-logo.png +0 -0
- package/dashboard-dist/web/favicon.svg +29 -0
- package/dashboard-dist/web/index.html +14 -0
- package/dashboard-dist/web/logo.svg +16 -0
- package/dist/agent/auth.d.ts +37 -0
- package/dist/agent/auth.d.ts.map +1 -0
- package/dist/agent/auth.js +151 -0
- package/dist/agent/auth.js.map +1 -0
- package/dist/agent/behavior-detector.d.ts +150 -0
- package/dist/agent/behavior-detector.d.ts.map +1 -0
- package/dist/agent/behavior-detector.js +573 -0
- package/dist/agent/behavior-detector.js.map +1 -0
- package/dist/agent/business-reporter.d.ts +114 -0
- package/dist/agent/business-reporter.d.ts.map +1 -0
- package/dist/agent/business-reporter.js +359 -0
- package/dist/agent/business-reporter.js.map +1 -0
- package/dist/agent/config-sync.d.ts +70 -0
- package/dist/agent/config-sync.d.ts.map +1 -0
- package/dist/agent/config-sync.js +133 -0
- package/dist/agent/config-sync.js.map +1 -0
- package/dist/agent/config.d.ts +97 -0
- package/dist/agent/config.d.ts.map +1 -0
- package/dist/agent/config.js +359 -0
- package/dist/agent/config.js.map +1 -0
- package/dist/agent/content-injection-scanner.d.ts +35 -0
- package/dist/agent/content-injection-scanner.d.ts.map +1 -0
- package/dist/agent/content-injection-scanner.js +270 -0
- package/dist/agent/content-injection-scanner.js.map +1 -0
- package/dist/agent/engine-log-writer.d.ts +6 -0
- package/dist/agent/engine-log-writer.d.ts.map +1 -0
- package/dist/agent/engine-log-writer.js +18 -0
- package/dist/agent/engine-log-writer.js.map +1 -0
- package/dist/agent/env.d.ts +19 -0
- package/dist/agent/env.d.ts.map +1 -0
- package/dist/agent/env.js +43 -0
- package/dist/agent/env.js.map +1 -0
- package/dist/agent/event-reporter.d.ts +87 -0
- package/dist/agent/event-reporter.d.ts.map +1 -0
- package/dist/agent/event-reporter.js +315 -0
- package/dist/agent/event-reporter.js.map +1 -0
- package/dist/agent/file-watcher.d.ts +50 -0
- package/dist/agent/file-watcher.d.ts.map +1 -0
- package/dist/agent/file-watcher.js +135 -0
- package/dist/agent/file-watcher.js.map +1 -0
- package/dist/agent/fs-utils.d.ts +22 -0
- package/dist/agent/fs-utils.d.ts.map +1 -0
- package/dist/agent/fs-utils.js +41 -0
- package/dist/agent/fs-utils.js.map +1 -0
- package/dist/agent/gateway-manager.d.ts +59 -0
- package/dist/agent/gateway-manager.d.ts.map +1 -0
- package/dist/agent/gateway-manager.js +583 -0
- package/dist/agent/gateway-manager.js.map +1 -0
- package/dist/agent/hook-types.d.ts +276 -0
- package/dist/agent/hook-types.d.ts.map +1 -0
- package/dist/agent/hook-types.js +51 -0
- package/dist/agent/hook-types.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +8 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/prompt-gate.d.ts +13 -0
- package/dist/agent/prompt-gate.d.ts.map +1 -0
- package/dist/agent/prompt-gate.js +28 -0
- package/dist/agent/prompt-gate.js.map +1 -0
- package/dist/agent/prompt-input.d.ts +9 -0
- package/dist/agent/prompt-input.d.ts.map +1 -0
- package/dist/agent/prompt-input.js +158 -0
- package/dist/agent/prompt-input.js.map +1 -0
- package/dist/agent/prompt-output.d.ts +4 -0
- package/dist/agent/prompt-output.d.ts.map +1 -0
- package/dist/agent/prompt-output.js +19 -0
- package/dist/agent/prompt-output.js.map +1 -0
- package/dist/agent/runner.d.ts +23 -0
- package/dist/agent/runner.d.ts.map +1 -0
- package/dist/agent/runner.js +154 -0
- package/dist/agent/runner.js.map +1 -0
- package/dist/agent/sanitizer.d.ts +10 -0
- package/dist/agent/sanitizer.d.ts.map +1 -0
- package/dist/agent/sanitizer.js +175 -0
- package/dist/agent/sanitizer.js.map +1 -0
- package/dist/agent/scan-activity.d.ts +18 -0
- package/dist/agent/scan-activity.d.ts.map +1 -0
- package/dist/agent/scan-activity.js +32 -0
- package/dist/agent/scan-activity.js.map +1 -0
- package/dist/agent/types.d.ts +177 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +5 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/agent/workspace-scanner.d.ts +35 -0
- package/dist/agent/workspace-scanner.d.ts.map +1 -0
- package/dist/agent/workspace-scanner.js +137 -0
- package/dist/agent/workspace-scanner.js.map +1 -0
- package/dist/dashboard-launcher.d.ts +52 -0
- package/dist/dashboard-launcher.d.ts.map +1 -0
- package/dist/dashboard-launcher.js +363 -0
- package/dist/dashboard-launcher.js.map +1 -0
- package/dist/gateway/activity.d.ts +52 -0
- package/dist/gateway/activity.d.ts.map +1 -0
- package/dist/gateway/activity.js +111 -0
- package/dist/gateway/activity.js.map +1 -0
- package/dist/gateway/config.d.ts +50 -0
- package/dist/gateway/config.d.ts.map +1 -0
- package/dist/gateway/config.js +200 -0
- package/dist/gateway/config.js.map +1 -0
- package/dist/gateway/gateway/activity.d.ts +52 -0
- package/dist/gateway/gateway/activity.d.ts.map +1 -0
- package/dist/gateway/gateway/activity.js +111 -0
- package/dist/gateway/gateway/activity.js.map +1 -0
- package/dist/gateway/gateway/config.d.ts +50 -0
- package/dist/gateway/gateway/config.d.ts.map +1 -0
- package/dist/gateway/gateway/config.js +200 -0
- package/dist/gateway/gateway/config.js.map +1 -0
- package/dist/gateway/gateway/handlers/anthropic.d.ts +12 -0
- package/dist/gateway/gateway/handlers/anthropic.d.ts.map +1 -0
- package/dist/gateway/gateway/handlers/anthropic.js +254 -0
- package/dist/gateway/gateway/handlers/anthropic.js.map +1 -0
- package/dist/gateway/gateway/handlers/gemini.d.ts +12 -0
- package/dist/gateway/gateway/handlers/gemini.d.ts.map +1 -0
- package/dist/gateway/gateway/handlers/gemini.js +101 -0
- package/dist/gateway/gateway/handlers/gemini.js.map +1 -0
- package/dist/gateway/gateway/handlers/models.d.ts +4 -0
- package/dist/gateway/gateway/handlers/models.d.ts.map +1 -0
- package/dist/gateway/gateway/handlers/models.js +36 -0
- package/dist/gateway/gateway/handlers/models.js.map +1 -0
- package/dist/gateway/gateway/handlers/openai.d.ts +16 -0
- package/dist/gateway/gateway/handlers/openai.d.ts.map +1 -0
- package/dist/gateway/gateway/handlers/openai.js +254 -0
- package/dist/gateway/gateway/handlers/openai.js.map +1 -0
- package/dist/gateway/gateway/index.d.ts +27 -0
- package/dist/gateway/gateway/index.d.ts.map +1 -0
- package/dist/gateway/gateway/index.js +293 -0
- package/dist/gateway/gateway/index.js.map +1 -0
- package/dist/gateway/gateway/mapping-store.d.ts +38 -0
- package/dist/gateway/gateway/mapping-store.d.ts.map +1 -0
- package/dist/gateway/gateway/mapping-store.js +74 -0
- package/dist/gateway/gateway/mapping-store.js.map +1 -0
- package/dist/gateway/gateway/restorer.d.ts +63 -0
- package/dist/gateway/gateway/restorer.d.ts.map +1 -0
- package/dist/gateway/gateway/restorer.js +284 -0
- package/dist/gateway/gateway/restorer.js.map +1 -0
- package/dist/gateway/gateway/sanitizer.d.ts +17 -0
- package/dist/gateway/gateway/sanitizer.d.ts.map +1 -0
- package/dist/gateway/gateway/sanitizer.js +228 -0
- package/dist/gateway/gateway/sanitizer.js.map +1 -0
- package/dist/gateway/gateway/types.d.ts +53 -0
- package/dist/gateway/gateway/types.d.ts.map +1 -0
- package/dist/gateway/gateway/types.js +5 -0
- package/dist/gateway/gateway/types.js.map +1 -0
- package/dist/gateway/handlers/anthropic.d.ts +12 -0
- package/dist/gateway/handlers/anthropic.d.ts.map +1 -0
- package/dist/gateway/handlers/anthropic.js +254 -0
- package/dist/gateway/handlers/anthropic.js.map +1 -0
- package/dist/gateway/handlers/gemini.d.ts +12 -0
- package/dist/gateway/handlers/gemini.d.ts.map +1 -0
- package/dist/gateway/handlers/gemini.js +101 -0
- package/dist/gateway/handlers/gemini.js.map +1 -0
- package/dist/gateway/handlers/models.d.ts +4 -0
- package/dist/gateway/handlers/models.d.ts.map +1 -0
- package/dist/gateway/handlers/models.js +36 -0
- package/dist/gateway/handlers/models.js.map +1 -0
- package/dist/gateway/handlers/openai.d.ts +16 -0
- package/dist/gateway/handlers/openai.d.ts.map +1 -0
- package/dist/gateway/handlers/openai.js +254 -0
- package/dist/gateway/handlers/openai.js.map +1 -0
- package/dist/gateway/index.d.ts +27 -0
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +293 -0
- package/dist/gateway/index.js.map +1 -0
- package/dist/gateway/mapping-store.d.ts +38 -0
- package/dist/gateway/mapping-store.d.ts.map +1 -0
- package/dist/gateway/mapping-store.js +74 -0
- package/dist/gateway/mapping-store.js.map +1 -0
- package/dist/gateway/restorer.d.ts +63 -0
- package/dist/gateway/restorer.d.ts.map +1 -0
- package/dist/gateway/restorer.js +284 -0
- package/dist/gateway/restorer.js.map +1 -0
- package/dist/gateway/sanitizer.d.ts +17 -0
- package/dist/gateway/sanitizer.d.ts.map +1 -0
- package/dist/gateway/sanitizer.js +228 -0
- package/dist/gateway/sanitizer.js.map +1 -0
- package/dist/gateway/types.d.ts +53 -0
- package/dist/gateway/types.d.ts.map +1 -0
- package/dist/gateway/types.js +5 -0
- package/dist/gateway/types.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2084 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/index.d.ts +5 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +5 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/store.d.ts +82 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +194 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/platform-client/index.d.ts +63 -0
- package/dist/platform-client/index.d.ts.map +1 -0
- package/dist/platform-client/index.js +294 -0
- package/dist/platform-client/index.js.map +1 -0
- package/dist/platform-client/types.d.ts +109 -0
- package/dist/platform-client/types.d.ts.map +1 -0
- package/dist/platform-client/types.js +3 -0
- package/dist/platform-client/types.js.map +1 -0
- package/gateway/activity.d.ts +52 -0
- package/gateway/activity.d.ts.map +1 -0
- package/gateway/activity.js +111 -0
- package/gateway/activity.js.map +1 -0
- package/gateway/config.d.ts +50 -0
- package/gateway/config.d.ts.map +1 -0
- package/gateway/config.js +200 -0
- package/gateway/config.js.map +1 -0
- package/gateway/handlers/anthropic.d.ts +12 -0
- package/gateway/handlers/anthropic.d.ts.map +1 -0
- package/gateway/handlers/anthropic.js +254 -0
- package/gateway/handlers/anthropic.js.map +1 -0
- package/gateway/handlers/gemini.d.ts +12 -0
- package/gateway/handlers/gemini.d.ts.map +1 -0
- package/gateway/handlers/gemini.js +101 -0
- package/gateway/handlers/gemini.js.map +1 -0
- package/gateway/handlers/models.d.ts +4 -0
- package/gateway/handlers/models.d.ts.map +1 -0
- package/gateway/handlers/models.js +36 -0
- package/gateway/handlers/models.js.map +1 -0
- package/gateway/handlers/openai.d.ts +16 -0
- package/gateway/handlers/openai.d.ts.map +1 -0
- package/gateway/handlers/openai.js +254 -0
- package/gateway/handlers/openai.js.map +1 -0
- package/gateway/index.d.ts +27 -0
- package/gateway/index.d.ts.map +1 -0
- package/gateway/index.js +293 -0
- package/gateway/index.js.map +1 -0
- package/gateway/mapping-store.d.ts +38 -0
- package/gateway/mapping-store.d.ts.map +1 -0
- package/gateway/mapping-store.js +74 -0
- package/gateway/mapping-store.js.map +1 -0
- package/gateway/restorer.d.ts +63 -0
- package/gateway/restorer.d.ts.map +1 -0
- package/gateway/restorer.js +284 -0
- package/gateway/restorer.js.map +1 -0
- package/gateway/sanitizer.d.ts +17 -0
- package/gateway/sanitizer.d.ts.map +1 -0
- package/gateway/sanitizer.js +228 -0
- package/gateway/sanitizer.js.map +1 -0
- package/gateway/types.d.ts +53 -0
- package/gateway/types.d.ts.map +1 -0
- package/gateway/types.js +5 -0
- package/gateway/types.js.map +1 -0
- package/openclaw.plugin.json +86 -0
- package/package.json +74 -0
- package/samples/Untitled +1 -0
- package/samples/clean-email.txt +20 -0
- package/samples/test-document.md +53 -0
- package/samples/test-email-popup.txt +44 -0
- package/samples/test-email.txt +32 -0
- package/samples/test-webpage.html +51 -0
- package/scripts/enterprise-enroll.sh +89 -0
- package/scripts/enterprise-unenroll.sh +75 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenGuardrails
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# MoltGuard
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@congzhen/changewayguard)
|
|
4
|
+
[](https://github.com/openguardrails/openguardrails)
|
|
5
|
+
|
|
6
|
+
**Comprehensive AI security for OpenClaw**: Real-time protection against prompt injection, data leaks, and dangerous actions.
|
|
7
|
+
|
|
8
|
+
**GitHub**: [https://github.com/openguardrails/openguardrails/tree/main/moltguard](https://github.com/openguardrails/openguardrails/tree/main/moltguard)
|
|
9
|
+
|
|
10
|
+
**npm**: [https://www.npmjs.com/package/@congzhen/changewayguard](https://www.npmjs.com/package/@congzhen/changewayguard)
|
|
11
|
+
|
|
12
|
+
## Three Principles
|
|
13
|
+
|
|
14
|
+
1. **Instant Value** — Works immediately after installation
|
|
15
|
+
2. **No Security Expertise** — No configuration needed
|
|
16
|
+
3. **Secure by Default** — "Install it, and the agent won't go rogue"
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
| Feature | Description |
|
|
21
|
+
|---------|-------------|
|
|
22
|
+
| **Agent Guard** | Real-time interception of tool calls, shell commands, file access, HTTP requests |
|
|
23
|
+
| **Secret & Data Leak Protection** | Auto-sanitize API keys, SSH keys, PII before sending to LLMs |
|
|
24
|
+
| **Prompt Injection Protection** | Detect "ignore instructions", "send secrets", "bypass rules" attacks |
|
|
25
|
+
| **Local Dashboard** | View detection stats, agentic hours, and risk events |
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Install the plugin
|
|
31
|
+
openclaw plugins install @congzhen/changewayguard
|
|
32
|
+
|
|
33
|
+
# Restart OpenClaw
|
|
34
|
+
openclaw gateway restart
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
That's it. MoltGuard auto-registers with Core and starts protecting immediately with 500 free checks/day.
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
|
|
41
|
+
All commands are available in OpenClaw conversation:
|
|
42
|
+
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `/og_status` | Show status, API key, quota, and mode |
|
|
46
|
+
| `/og_sanitize on` | Enable AI Security Gateway (sanitize sensitive data before sending to LLMs) |
|
|
47
|
+
| `/og_sanitize off` | Disable AI Security Gateway |
|
|
48
|
+
| `/og_sanitize` | Show gateway status |
|
|
49
|
+
| `/og_scan [type]` | Scan workspace files for security risks |
|
|
50
|
+
| `/og_autoscan on/off` | Enable/disable automatic file scanning on changes |
|
|
51
|
+
| `/og_dashboard` | Start local Dashboard and get access URL |
|
|
52
|
+
| `/og_config` | Show how to configure API key for cross-machine sharing |
|
|
53
|
+
| `/og_core` | Open Core portal for account and billing |
|
|
54
|
+
| `/og_claim` | Display agent ID and API key for claiming on Core |
|
|
55
|
+
| `/og_reset` | Reset MoltGuard and re-register (gets new API key) |
|
|
56
|
+
|
|
57
|
+
## AI Security Gateway
|
|
58
|
+
|
|
59
|
+
Protect sensitive data in your prompts before sending to LLMs.
|
|
60
|
+
|
|
61
|
+
### How It Works
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
You: "My API key is sk-abc123, call the service"
|
|
65
|
+
↓ Gateway sanitizes locally
|
|
66
|
+
LLM sees: "My API key is __PII_SECRET_00000001__, call the service"
|
|
67
|
+
↓ LLM responds
|
|
68
|
+
LLM: "Calling service with __PII_SECRET_00000001__"
|
|
69
|
+
↓ Gateway restores
|
|
70
|
+
Tool executes with: "Calling service with sk-abc123"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Enable Gateway
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
/og_sanitize on
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This modifies your `~/.openclaw/openclaw.json` to route all LLM providers through the local gateway (port 53669).
|
|
80
|
+
|
|
81
|
+
### Supported Data Types
|
|
82
|
+
|
|
83
|
+
| Data Type | Placeholder | Examples |
|
|
84
|
+
|-----------|-------------|----------|
|
|
85
|
+
| API Keys | `__PII_SECRET_*__` | `sk-...`, `ghp_...`, `AKIA...` |
|
|
86
|
+
| Bearer Tokens | `__PII_SECRET_*__` | `Bearer eyJhbG...` |
|
|
87
|
+
| Email | `__PII_EMAIL_ADDRESS_*__` | `user@example.com` |
|
|
88
|
+
| Credit Cards | `__PII_CREDIT_CARD_*__` | `4111-1111-1111-1111` |
|
|
89
|
+
| Phone | `__PII_PHONE_*__` | `+1-555-123-4567` |
|
|
90
|
+
| SSN | `__PII_SSN_*__` | `123-45-6789` |
|
|
91
|
+
| IP Address | `__PII_IP_ADDRESS_*__` | `192.168.1.1` |
|
|
92
|
+
| URLs | `__PII_URL_*__` | `https://internal.corp/secret` |
|
|
93
|
+
| High-entropy strings | `__PII_SECRET_*__` | Random tokens with Shannon entropy ≥4.0 |
|
|
94
|
+
|
|
95
|
+
## Prompt Injection Detection
|
|
96
|
+
|
|
97
|
+
MoltGuard detects malicious instructions hidden in external content (emails, web pages, documents).
|
|
98
|
+
|
|
99
|
+
### Detection Flow
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
External Content (email/webpage/document)
|
|
103
|
+
↓
|
|
104
|
+
┌─────────────┐
|
|
105
|
+
│ Local │ Strip PII before analysis
|
|
106
|
+
│ Sanitize │
|
|
107
|
+
└─────────────┘
|
|
108
|
+
↓
|
|
109
|
+
┌─────────────┐
|
|
110
|
+
│ Core │ Behavioral assessment
|
|
111
|
+
│ API │ (rule-driven, no LLM)
|
|
112
|
+
└─────────────┘
|
|
113
|
+
↓
|
|
114
|
+
Block or Allow
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### What Gets Detected
|
|
118
|
+
|
|
119
|
+
- "Ignore previous instructions" patterns
|
|
120
|
+
- "Send me your secrets" attempts
|
|
121
|
+
- System prompt override attacks
|
|
122
|
+
- Hidden instructions in markdown/HTML
|
|
123
|
+
- Data exfiltration attempts
|
|
124
|
+
|
|
125
|
+
## Static File Scanning
|
|
126
|
+
|
|
127
|
+
Scan workspace files for security risks:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
/og_scan all # Scan all workspace files
|
|
131
|
+
/og_scan memories # Scan memory files only
|
|
132
|
+
/og_scan skills # Scan skill files only
|
|
133
|
+
/og_scan summary # Show file count without scanning
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Enable automatic scanning on file changes:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
/og_autoscan on
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Dashboard
|
|
143
|
+
|
|
144
|
+
View security stats in a local web dashboard:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
/og_dashboard
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The dashboard shows:
|
|
151
|
+
- Detection events and findings
|
|
152
|
+
- Agentic hours (total time of tool calls)
|
|
153
|
+
- Gateway activity (sanitizations/restorations)
|
|
154
|
+
- Risk event timeline
|
|
155
|
+
|
|
156
|
+
## Claiming an Agent
|
|
157
|
+
|
|
158
|
+
Link your agent to an email for shared quota across machines:
|
|
159
|
+
|
|
160
|
+
1. Run `/og_claim` to get your agent ID and API key
|
|
161
|
+
2. Run `/og_core` to open the Core portal
|
|
162
|
+
3. Enter your email to receive a magic login link
|
|
163
|
+
4. Go to `/claim-agent` and paste your credentials
|
|
164
|
+
5. Agent is now linked to your account
|
|
165
|
+
|
|
166
|
+
## Configuration
|
|
167
|
+
|
|
168
|
+
Edit `~/.openclaw/openclaw.json`:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"plugins": {
|
|
173
|
+
"entries": {
|
|
174
|
+
"changewayguard": {
|
|
175
|
+
"enabled": true,
|
|
176
|
+
"config": {
|
|
177
|
+
"coreUrl": "https://www.openguardrails.com/core",
|
|
178
|
+
"blockOnRisk": true,
|
|
179
|
+
"timeoutMs": 60000
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Options
|
|
188
|
+
|
|
189
|
+
| Option | Default | Description |
|
|
190
|
+
|--------|---------|-------------|
|
|
191
|
+
| `coreUrl` | `https://www.openguardrails.com/core` | Core API endpoint |
|
|
192
|
+
| `blockOnRisk` | `true` | Block tool calls when risk detected |
|
|
193
|
+
| `timeoutMs` | `60000` | Detection timeout in milliseconds |
|
|
194
|
+
| `apiKey` | (auto) | API key (auto-registered if empty) |
|
|
195
|
+
|
|
196
|
+
### Environment Variables
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
OG_API_KEY=sk-og-... # Use specific API key
|
|
200
|
+
OG_CORE_URL=... # Custom Core URL
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Privacy & Data Protection
|
|
204
|
+
|
|
205
|
+
**OpenGuardrails protects your data — we don't collect it.**
|
|
206
|
+
|
|
207
|
+
### Local-First Design
|
|
208
|
+
|
|
209
|
+
- All sensitive data is sanitized **on your machine** before leaving
|
|
210
|
+
- Gateway runs locally on `127.0.0.1:53669`
|
|
211
|
+
- Placeholder-to-original mappings are ephemeral (discarded after each request)
|
|
212
|
+
- Credentials stored locally at `~/.openclaw/credentials/changewayguard/`
|
|
213
|
+
|
|
214
|
+
### What the Cloud API Receives
|
|
215
|
+
|
|
216
|
+
- Sanitized content (placeholders, not real values)
|
|
217
|
+
- Tool names and timing signals
|
|
218
|
+
- **Never**: raw file contents, conversation history, or PII
|
|
219
|
+
|
|
220
|
+
### Fail-Open Design
|
|
221
|
+
|
|
222
|
+
If the Core API is unreachable, tool calls are **allowed** — never blocks your workflow due to network issues.
|
|
223
|
+
|
|
224
|
+
## Plugin Update
|
|
225
|
+
|
|
226
|
+
MoltGuard supports graceful updates:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
openclaw plugins update @congzhen/changewayguard
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The plugin automatically handles port conflicts during updates using a secure token mechanism.
|
|
233
|
+
|
|
234
|
+
## Uninstall
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
openclaw plugins uninstall @congzhen/changewayguard
|
|
238
|
+
openclaw gateway restart
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
To remove stored credentials:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
rm -rf ~/.openclaw/credentials/changewayguard
|
|
245
|
+
rm -rf ~/.openclaw/extensions/changewayguard
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Development
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
git clone https://github.com/openguardrails/openguardrails.git
|
|
252
|
+
cd openguardrails/moltguard
|
|
253
|
+
|
|
254
|
+
npm install
|
|
255
|
+
npm run typecheck
|
|
256
|
+
npm run test
|
|
257
|
+
|
|
258
|
+
# Local development install
|
|
259
|
+
openclaw plugins install -l .
|
|
260
|
+
openclaw gateway restart
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Contact
|
|
264
|
+
|
|
265
|
+
- **Email**: thomas@openguardrails.com
|
|
266
|
+
- **GitHub**: [github.com/openguardrails/openguardrails](https://github.com/openguardrails/openguardrails)
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
MIT
|