@gendigital/sage-openclaw 0.8.0 → 0.10.0
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/README.md +63 -20
- package/dist/index.cjs +2978 -831
- package/dist/index.cjs.map +4 -4
- package/dist/model-download-worker.cjs +8032 -0
- package/dist/model-download-worker.cjs.map +7 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +14 -2
- package/resources/threats/commands.yaml +11 -4
- package/resources/threats/dummy.yaml +195 -0
- package/resources/threats/mitre.yaml +2 -2
- package/resources/threats/prompt-injection.yaml +335 -0
- package/resources/threats/urls.yaml +5 -2
- package/resources/threats/win-credentials.yaml +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sage — Safety for Agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/gendigitalinc/sage/main/images/logo-shaded.png" alt="Sage" width="250">
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
Protect your AI coding agent from dangerous commands, malicious URLs, and harmful file operations.
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="https://raw.githubusercontent.com/gendigitalinc/sage/main/images/block-openclaw-allow.gif" alt="Sage blocking a dangerous command in OpenClaw" width="700">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## What is Sage?
|
|
18
|
+
|
|
19
|
+
Sage is a security layer for OpenClaw. It intercepts tool calls — shell commands, URL fetches, file writes — and checks them for threats before they execute. If something looks dangerous, Sage blocks it with a native approval dialog.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## What it protects against
|
|
23
|
+
|
|
24
|
+
- **Malicious URLs** — phishing, malware, and scam sites detected via cloud reputation
|
|
25
|
+
- **Dangerous commands** — reverse shells, pipe-to-curl, credential theft, data exfiltration
|
|
26
|
+
- **Prompt injection** — heuristics + a fine-tuned ML model detect injected instructions in fetched content
|
|
27
|
+
- **Suspicious file operations** — writes to sensitive paths, credential files, system configs
|
|
28
|
+
- **Supply-chain attacks** — malicious or typosquatted npm/PyPI packages
|
|
29
|
+
- **Compromised plugins** — automatic scanning of installed plugins at session start
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
See the [install guide](https://ai.gendigital.com/sage#install-openclaw) for step-by-step instructions, or run:
|
|
8
34
|
|
|
9
35
|
```bash
|
|
10
36
|
openclaw plugins install @gendigital/sage-openclaw
|
|
11
37
|
```
|
|
12
38
|
|
|
13
|
-
|
|
39
|
+
Sage loads automatically — no configuration needed.
|
|
40
|
+
|
|
41
|
+
> To verify it's working, ask your agent to run `echo __sage_test_deny_cmd_a75bf229__`. Sage should block this harmless canary command.
|
|
14
42
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
43
|
+
## What Sage intercepts
|
|
44
|
+
|
|
45
|
+
Sage hooks into OpenClaw's `before_tool_call` lifecycle:
|
|
46
|
+
|
|
47
|
+
- **exec** — shell commands
|
|
48
|
+
- **write / edit** — file modifications
|
|
49
|
+
- **read** — file reads (sensitive paths)
|
|
50
|
+
- **web_fetch** — URL fetches and downloads
|
|
51
|
+
- **apply_patch** — patch application
|
|
52
|
+
|
|
53
|
+
## How it works
|
|
54
|
+
|
|
55
|
+
When your agent makes a tool call, Sage evaluates it and returns a verdict:
|
|
56
|
+
|
|
57
|
+
| Verdict | What happens |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| **Allow** | No threats detected — the action proceeds normally |
|
|
60
|
+
| **Ask** | Suspicious activity — you're prompted via native approval dialog |
|
|
61
|
+
| **Deny** | Threat detected — the action is blocked |
|
|
62
|
+
|
|
63
|
+
Sage is designed to fail open: if anything goes wrong internally, the action proceeds. Your agent is never blocked due to a Sage error.
|
|
21
64
|
|
|
22
65
|
## Configuration
|
|
23
66
|
|
|
24
|
-
Sage works out of the box with no configuration.
|
|
67
|
+
Sage works out of the box with no configuration. To customize behavior, edit `~/.sage/config.json`:
|
|
25
68
|
|
|
26
69
|
```json
|
|
27
70
|
{
|
|
28
71
|
"sensitivity": "balanced",
|
|
29
72
|
"url_check": { "enabled": true },
|
|
30
|
-
"
|
|
73
|
+
"heuristics_enabled": true
|
|
31
74
|
}
|
|
32
75
|
```
|
|
33
76
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- [Source & documentation](https://github.com/gendigitalinc/sage)
|
|
37
|
-
- [OpenClaw platform guide](https://github.com/gendigitalinc/sage/blob/main/docs/platform-guides/openclaw.md)
|
|
38
|
-
- [Privacy policy](https://github.com/gendigitalinc/sage/blob/main/docs/privacy.md)
|
|
77
|
+
See [Configuration](https://github.com/gendigitalinc/sage/blob/main/docs/configuration.md) for all options.
|
|
39
78
|
|
|
40
|
-
##
|
|
79
|
+
## Links
|
|
41
80
|
|
|
42
|
-
|
|
81
|
+
- [User Guide](https://github.com/gendigitalinc/sage/blob/main/docs/user-guide.md) — verify install, handle alerts, manage false positives
|
|
82
|
+
- [Configuration](https://github.com/gendigitalinc/sage/blob/main/docs/configuration.md) — all config options
|
|
83
|
+
- [Exceptions](https://github.com/gendigitalinc/sage/blob/main/docs/exceptions.md) — pattern-based allow/deny rules
|
|
84
|
+
- [Privacy](https://github.com/gendigitalinc/sage/blob/main/docs/privacy.md) — what data is sent, what stays local
|
|
85
|
+
- [GitHub](https://github.com/gendigitalinc/sage)
|