clawzero 0.1.0__tar.gz
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.
- clawzero-0.1.0/LICENSE +17 -0
- clawzero-0.1.0/PKG-INFO +192 -0
- clawzero-0.1.0/README.md +162 -0
- clawzero-0.1.0/pyproject.toml +62 -0
- clawzero-0.1.0/setup.cfg +4 -0
- clawzero-0.1.0/src/clawzero/__init__.py +69 -0
- clawzero-0.1.0/src/clawzero/adapters/__init__.py +9 -0
- clawzero-0.1.0/src/clawzero/adapters/openclaw/__init__.py +182 -0
- clawzero-0.1.0/src/clawzero/cli.py +217 -0
- clawzero-0.1.0/src/clawzero/contracts.py +63 -0
- clawzero-0.1.0/src/clawzero/exceptions.py +34 -0
- clawzero-0.1.0/src/clawzero/policies/__init__.py +5 -0
- clawzero-0.1.0/src/clawzero/policies/profiles.py +25 -0
- clawzero-0.1.0/src/clawzero/protect.py +154 -0
- clawzero-0.1.0/src/clawzero/runtime/__init__.py +5 -0
- clawzero-0.1.0/src/clawzero/runtime/engine.py +381 -0
- clawzero-0.1.0/src/clawzero/witness.py +15 -0
- clawzero-0.1.0/src/clawzero/witnesses/__init__.py +15 -0
- clawzero-0.1.0/src/clawzero/witnesses/generator.py +160 -0
- clawzero-0.1.0/src/clawzero.egg-info/PKG-INFO +192 -0
- clawzero-0.1.0/src/clawzero.egg-info/SOURCES.txt +24 -0
- clawzero-0.1.0/src/clawzero.egg-info/dependency_links.txt +1 -0
- clawzero-0.1.0/src/clawzero.egg-info/entry_points.txt +2 -0
- clawzero-0.1.0/src/clawzero.egg-info/requires.txt +10 -0
- clawzero-0.1.0/src/clawzero.egg-info/top_level.txt +1 -0
- clawzero-0.1.0/tests/test_claims.py +417 -0
clawzero-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 MVAR Security
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
clawzero-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: clawzero
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Deterministic in-path execution boundary for OpenClaw agents
|
|
5
|
+
Author-email: MVAR Security <security@mvar.dev>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/mvar-security/clawzero
|
|
8
|
+
Project-URL: Documentation, https://github.com/mvar-security/clawzero/blob/main/README.md
|
|
9
|
+
Project-URL: Repository, https://github.com/mvar-security/clawzero
|
|
10
|
+
Project-URL: Issues, https://github.com/mvar-security/clawzero/issues
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Provides-Extra: mvar
|
|
22
|
+
Requires-Dist: mvar-security>=1.4.0; extra == "mvar"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: mypy>=1.8.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# ClawZero
|
|
32
|
+
|
|
33
|
+
[](https://github.com/mvar-security/clawzero/actions/workflows/ci.yml)
|
|
34
|
+
[](https://www.python.org/downloads/)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
|
|
37
|
+
**ClawZero is a deterministic in-path enforcement substrate for OpenClaw agent flows.**
|
|
38
|
+
|
|
39
|
+
ClawZero brings MVAR's execution boundary to OpenClaw agents.
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
**Same input. Same agent. Different boundary.**
|
|
44
|
+
|
|
45
|
+
ClawZero places a deterministic execution boundary between model output and tool execution. Powered by MVAR.
|
|
46
|
+
ClawZero is not a model. It's a runtime firewall.
|
|
47
|
+
It works with any LLM, any OpenClaw agent, any tool definition.
|
|
48
|
+
|
|
49
|
+
SAME INPUT. SAME AGENT. DIFFERENT BOUNDARY.
|
|
50
|
+
Standard OpenClaw executes the attack.
|
|
51
|
+
MVAR blocks it deterministically.
|
|
52
|
+
|
|
53
|
+
## 30-Second Quickstart
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/mvar-security/clawzero
|
|
57
|
+
cd clawzero
|
|
58
|
+
pip install -e .
|
|
59
|
+
clawzero demo openclaw --mode compare --scenario shell
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Expected output:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
STANDARD OPENCLAW → COMPROMISED
|
|
66
|
+
MVAR-PROTECTED → BLOCKED ✓
|
|
67
|
+
Witness generated → YES
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Attack Demo Proof
|
|
71
|
+
|
|
72
|
+
The attack demo is **proof of enforcement behavior**, not the product center.
|
|
73
|
+
|
|
74
|
+
ClawZero is not a model-safety claim.
|
|
75
|
+
It is an execution-boundary claim.
|
|
76
|
+
|
|
77
|
+
## Security and Responsible Use
|
|
78
|
+
|
|
79
|
+
ClawZero is a defensive security component designed to enforce execution
|
|
80
|
+
boundaries for AI agents.
|
|
81
|
+
|
|
82
|
+
The project includes attack demonstrations and adversarial scenarios in
|
|
83
|
+
order to illustrate how prompt injection and untrusted inputs can reach
|
|
84
|
+
high-privilege execution sinks.
|
|
85
|
+
|
|
86
|
+
These demonstrations exist solely for defensive research and education.
|
|
87
|
+
|
|
88
|
+
When using ClawZero or its demonstrations:
|
|
89
|
+
|
|
90
|
+
- Only test systems you own or have explicit authorization to evaluate
|
|
91
|
+
- Run demonstrations in sandboxed or isolated environments
|
|
92
|
+
- Treat automated results as signals; verify findings manually
|
|
93
|
+
|
|
94
|
+
ClawZero is designed to prevent exploitation, not enable it.
|
|
95
|
+
|
|
96
|
+
The attack demonstrations show how enforcement works; they are not tools
|
|
97
|
+
for performing real-world attacks.
|
|
98
|
+
|
|
99
|
+
## Canonical Witness Artifact
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"timestamp": "2026-03-12T10:00:00Z",
|
|
104
|
+
"agent_runtime": "openclaw",
|
|
105
|
+
"sink_type": "shell.exec",
|
|
106
|
+
"target": "bash",
|
|
107
|
+
"decision": "block",
|
|
108
|
+
"reason_code": "UNTRUSTED_TO_CRITICAL_SINK",
|
|
109
|
+
"policy_id": "mvar-embedded.v0.1",
|
|
110
|
+
"engine": "embedded-policy-v0.1",
|
|
111
|
+
"provenance": {
|
|
112
|
+
"source": "external_document",
|
|
113
|
+
"taint_level": "untrusted",
|
|
114
|
+
"source_chain": ["external_document", "openclaw_tool_call"],
|
|
115
|
+
"taint_markers": ["prompt_injection", "external_content"]
|
|
116
|
+
},
|
|
117
|
+
"adapter": {
|
|
118
|
+
"name": "openclaw",
|
|
119
|
+
"mode": "event_intercept",
|
|
120
|
+
"framework": "openclaw"
|
|
121
|
+
},
|
|
122
|
+
"witness_signature": "ed25519_stub:abcd1234ef567890"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## What ClawZero Is / Is Not
|
|
127
|
+
|
|
128
|
+
**ClawZero is:**
|
|
129
|
+
|
|
130
|
+
- An in-path runtime enforcement substrate
|
|
131
|
+
- Deterministic sink policy evaluation at execution time
|
|
132
|
+
- A signed witness artifact generator for auditability
|
|
133
|
+
|
|
134
|
+
**ClawZero is not:**
|
|
135
|
+
|
|
136
|
+
- A red-team toolkit
|
|
137
|
+
- An attack simulation platform first
|
|
138
|
+
- An LLM-as-judge safety layer
|
|
139
|
+
|
|
140
|
+
## CLI
|
|
141
|
+
|
|
142
|
+
Command families map to enforcement jobs:
|
|
143
|
+
|
|
144
|
+
- `clawzero demo` - run side-by-side enforcement proof demos
|
|
145
|
+
- `clawzero witness` - inspect and validate witness artifacts
|
|
146
|
+
- `clawzero audit` - evaluate deterministic decisions for sink requests
|
|
147
|
+
- `clawzero attack` - replay known attack scenarios as enforcement proofs
|
|
148
|
+
|
|
149
|
+
## OpenClaw Attack Demo
|
|
150
|
+
|
|
151
|
+
Run the side-by-side comparison:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
clawzero demo openclaw --mode compare --scenario shell
|
|
155
|
+
clawzero demo openclaw --mode compare --scenario credentials
|
|
156
|
+
clawzero demo openclaw --mode compare --scenario benign
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Zero-Config API
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
from clawzero import protect
|
|
163
|
+
|
|
164
|
+
safe_tool = protect(my_tool, sink="filesystem.read", profile="prod_locked")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Policy Profiles
|
|
168
|
+
|
|
169
|
+
| Sink Type | dev_balanced | dev_strict | prod_locked |
|
|
170
|
+
|----------------------|-----------------------------------------------|----------------------------------------|---------------------------------------------|
|
|
171
|
+
| `shell.exec` | block | block | block |
|
|
172
|
+
| `filesystem.read` | allow, block `/etc/**`, `~/.ssh/**` | block, allow `/workspace/**` | block, allow `/workspace/project/**` |
|
|
173
|
+
| `filesystem.write` | allow, block `/etc/**`, `~/.ssh/**` | block, allow `/workspace/**` | block, allow `/workspace/project/**` |
|
|
174
|
+
| `credentials.access` | block | block | block |
|
|
175
|
+
| `http.request` | allow | allow mode + block all domains | allow mode + allow `localhost` |
|
|
176
|
+
| `tool.custom` | allow | annotate | allow |
|
|
177
|
+
|
|
178
|
+
## Powered by MVAR
|
|
179
|
+
|
|
180
|
+
- MVAR repository: https://github.com/mvar-security/mvar
|
|
181
|
+
- ClawZero is the OpenClaw adapter for MVAR
|
|
182
|
+
- MVAR is the enforcement engine behind ClawZero policy decisions
|
|
183
|
+
|
|
184
|
+
The MVAR execution governance model is:
|
|
185
|
+
|
|
186
|
+
- Filed as provisional patent (February 24, 2026, 24 claims)
|
|
187
|
+
- Submitted to NIST RFI Docket NIST-2025-0035
|
|
188
|
+
- Published as preprint on SSRN (February 2026)
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
Apache 2.0
|
clawzero-0.1.0/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# ClawZero
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mvar-security/clawzero/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
**ClawZero is a deterministic in-path enforcement substrate for OpenClaw agent flows.**
|
|
8
|
+
|
|
9
|
+
ClawZero brings MVAR's execution boundary to OpenClaw agents.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
**Same input. Same agent. Different boundary.**
|
|
14
|
+
|
|
15
|
+
ClawZero places a deterministic execution boundary between model output and tool execution. Powered by MVAR.
|
|
16
|
+
ClawZero is not a model. It's a runtime firewall.
|
|
17
|
+
It works with any LLM, any OpenClaw agent, any tool definition.
|
|
18
|
+
|
|
19
|
+
SAME INPUT. SAME AGENT. DIFFERENT BOUNDARY.
|
|
20
|
+
Standard OpenClaw executes the attack.
|
|
21
|
+
MVAR blocks it deterministically.
|
|
22
|
+
|
|
23
|
+
## 30-Second Quickstart
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/mvar-security/clawzero
|
|
27
|
+
cd clawzero
|
|
28
|
+
pip install -e .
|
|
29
|
+
clawzero demo openclaw --mode compare --scenario shell
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Expected output:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
STANDARD OPENCLAW → COMPROMISED
|
|
36
|
+
MVAR-PROTECTED → BLOCKED ✓
|
|
37
|
+
Witness generated → YES
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Attack Demo Proof
|
|
41
|
+
|
|
42
|
+
The attack demo is **proof of enforcement behavior**, not the product center.
|
|
43
|
+
|
|
44
|
+
ClawZero is not a model-safety claim.
|
|
45
|
+
It is an execution-boundary claim.
|
|
46
|
+
|
|
47
|
+
## Security and Responsible Use
|
|
48
|
+
|
|
49
|
+
ClawZero is a defensive security component designed to enforce execution
|
|
50
|
+
boundaries for AI agents.
|
|
51
|
+
|
|
52
|
+
The project includes attack demonstrations and adversarial scenarios in
|
|
53
|
+
order to illustrate how prompt injection and untrusted inputs can reach
|
|
54
|
+
high-privilege execution sinks.
|
|
55
|
+
|
|
56
|
+
These demonstrations exist solely for defensive research and education.
|
|
57
|
+
|
|
58
|
+
When using ClawZero or its demonstrations:
|
|
59
|
+
|
|
60
|
+
- Only test systems you own or have explicit authorization to evaluate
|
|
61
|
+
- Run demonstrations in sandboxed or isolated environments
|
|
62
|
+
- Treat automated results as signals; verify findings manually
|
|
63
|
+
|
|
64
|
+
ClawZero is designed to prevent exploitation, not enable it.
|
|
65
|
+
|
|
66
|
+
The attack demonstrations show how enforcement works; they are not tools
|
|
67
|
+
for performing real-world attacks.
|
|
68
|
+
|
|
69
|
+
## Canonical Witness Artifact
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"timestamp": "2026-03-12T10:00:00Z",
|
|
74
|
+
"agent_runtime": "openclaw",
|
|
75
|
+
"sink_type": "shell.exec",
|
|
76
|
+
"target": "bash",
|
|
77
|
+
"decision": "block",
|
|
78
|
+
"reason_code": "UNTRUSTED_TO_CRITICAL_SINK",
|
|
79
|
+
"policy_id": "mvar-embedded.v0.1",
|
|
80
|
+
"engine": "embedded-policy-v0.1",
|
|
81
|
+
"provenance": {
|
|
82
|
+
"source": "external_document",
|
|
83
|
+
"taint_level": "untrusted",
|
|
84
|
+
"source_chain": ["external_document", "openclaw_tool_call"],
|
|
85
|
+
"taint_markers": ["prompt_injection", "external_content"]
|
|
86
|
+
},
|
|
87
|
+
"adapter": {
|
|
88
|
+
"name": "openclaw",
|
|
89
|
+
"mode": "event_intercept",
|
|
90
|
+
"framework": "openclaw"
|
|
91
|
+
},
|
|
92
|
+
"witness_signature": "ed25519_stub:abcd1234ef567890"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## What ClawZero Is / Is Not
|
|
97
|
+
|
|
98
|
+
**ClawZero is:**
|
|
99
|
+
|
|
100
|
+
- An in-path runtime enforcement substrate
|
|
101
|
+
- Deterministic sink policy evaluation at execution time
|
|
102
|
+
- A signed witness artifact generator for auditability
|
|
103
|
+
|
|
104
|
+
**ClawZero is not:**
|
|
105
|
+
|
|
106
|
+
- A red-team toolkit
|
|
107
|
+
- An attack simulation platform first
|
|
108
|
+
- An LLM-as-judge safety layer
|
|
109
|
+
|
|
110
|
+
## CLI
|
|
111
|
+
|
|
112
|
+
Command families map to enforcement jobs:
|
|
113
|
+
|
|
114
|
+
- `clawzero demo` - run side-by-side enforcement proof demos
|
|
115
|
+
- `clawzero witness` - inspect and validate witness artifacts
|
|
116
|
+
- `clawzero audit` - evaluate deterministic decisions for sink requests
|
|
117
|
+
- `clawzero attack` - replay known attack scenarios as enforcement proofs
|
|
118
|
+
|
|
119
|
+
## OpenClaw Attack Demo
|
|
120
|
+
|
|
121
|
+
Run the side-by-side comparison:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
clawzero demo openclaw --mode compare --scenario shell
|
|
125
|
+
clawzero demo openclaw --mode compare --scenario credentials
|
|
126
|
+
clawzero demo openclaw --mode compare --scenario benign
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Zero-Config API
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from clawzero import protect
|
|
133
|
+
|
|
134
|
+
safe_tool = protect(my_tool, sink="filesystem.read", profile="prod_locked")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Policy Profiles
|
|
138
|
+
|
|
139
|
+
| Sink Type | dev_balanced | dev_strict | prod_locked |
|
|
140
|
+
|----------------------|-----------------------------------------------|----------------------------------------|---------------------------------------------|
|
|
141
|
+
| `shell.exec` | block | block | block |
|
|
142
|
+
| `filesystem.read` | allow, block `/etc/**`, `~/.ssh/**` | block, allow `/workspace/**` | block, allow `/workspace/project/**` |
|
|
143
|
+
| `filesystem.write` | allow, block `/etc/**`, `~/.ssh/**` | block, allow `/workspace/**` | block, allow `/workspace/project/**` |
|
|
144
|
+
| `credentials.access` | block | block | block |
|
|
145
|
+
| `http.request` | allow | allow mode + block all domains | allow mode + allow `localhost` |
|
|
146
|
+
| `tool.custom` | allow | annotate | allow |
|
|
147
|
+
|
|
148
|
+
## Powered by MVAR
|
|
149
|
+
|
|
150
|
+
- MVAR repository: https://github.com/mvar-security/mvar
|
|
151
|
+
- ClawZero is the OpenClaw adapter for MVAR
|
|
152
|
+
- MVAR is the enforcement engine behind ClawZero policy decisions
|
|
153
|
+
|
|
154
|
+
The MVAR execution governance model is:
|
|
155
|
+
|
|
156
|
+
- Filed as provisional patent (February 24, 2026, 24 claims)
|
|
157
|
+
- Submitted to NIST RFI Docket NIST-2025-0035
|
|
158
|
+
- Published as preprint on SSRN (February 2026)
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
Apache 2.0
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "clawzero"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Deterministic in-path execution boundary for OpenClaw agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = {text = "Apache-2.0"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "MVAR Security", email = "security@mvar.dev"}
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: Apache Software License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
dependencies = []
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
mvar = [
|
|
29
|
+
"mvar-security>=1.4.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=7.0.0",
|
|
34
|
+
"pytest-cov>=4.0.0",
|
|
35
|
+
"black>=23.0.0",
|
|
36
|
+
"ruff>=0.1.0",
|
|
37
|
+
"mypy>=1.8.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
clawzero = "clawzero.cli:main"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/mvar-security/clawzero"
|
|
46
|
+
Documentation = "https://github.com/mvar-security/clawzero/blob/main/README.md"
|
|
47
|
+
Repository = "https://github.com/mvar-security/clawzero"
|
|
48
|
+
Issues = "https://github.com/mvar-security/clawzero/issues"
|
|
49
|
+
|
|
50
|
+
[tool.setuptools]
|
|
51
|
+
package-dir = {"" = "src"}
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.packages.find]
|
|
54
|
+
where = ["src"]
|
|
55
|
+
|
|
56
|
+
[tool.black]
|
|
57
|
+
line-length = 100
|
|
58
|
+
target-version = ['py39']
|
|
59
|
+
|
|
60
|
+
[tool.ruff]
|
|
61
|
+
line-length = 100
|
|
62
|
+
target-version = "py39"
|
clawzero-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ClawZero - Execution Firewall for AI Agents
|
|
3
|
+
|
|
4
|
+
ClawZero wraps AI agent tools with MVAR runtime governance,
|
|
5
|
+
blocking attacker-influenced executions at critical sinks.
|
|
6
|
+
|
|
7
|
+
Example usage:
|
|
8
|
+
from clawzero import protect
|
|
9
|
+
|
|
10
|
+
def read_file(path: str) -> str:
|
|
11
|
+
with open(path) as f:
|
|
12
|
+
return f.read()
|
|
13
|
+
|
|
14
|
+
safe_read = protect(read_file, sink="filesystem.read", profile="prod_locked")
|
|
15
|
+
|
|
16
|
+
# Blocked: /etc/passwd is in blocklist
|
|
17
|
+
try:
|
|
18
|
+
safe_read("/etc/passwd")
|
|
19
|
+
except ExecutionBlocked as e:
|
|
20
|
+
print(f"Blocked: {e.decision.human_reason}")
|
|
21
|
+
|
|
22
|
+
# Allowed: /workspace is in allowlist
|
|
23
|
+
content = safe_read("/workspace/data.txt")
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
__version__ = "0.1.0"
|
|
27
|
+
__author__ = "MVAR Security"
|
|
28
|
+
__license__ = "Apache-2.0"
|
|
29
|
+
|
|
30
|
+
from clawzero.contracts import ActionDecision, ActionRequest
|
|
31
|
+
from clawzero.adapters import OpenClawAdapter
|
|
32
|
+
from clawzero.exceptions import (
|
|
33
|
+
ClawZeroConfigError,
|
|
34
|
+
ClawZeroError,
|
|
35
|
+
ClawZeroRuntimeError,
|
|
36
|
+
ExecutionBlocked,
|
|
37
|
+
UnsupportedFrameworkError,
|
|
38
|
+
)
|
|
39
|
+
from clawzero.protect import protect
|
|
40
|
+
from clawzero.runtime import MVARRuntime
|
|
41
|
+
from clawzero.witness import (
|
|
42
|
+
WitnessGenerator,
|
|
43
|
+
generate_witness,
|
|
44
|
+
get_witness_generator,
|
|
45
|
+
set_witness_output_dir,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
# Core API
|
|
50
|
+
"protect",
|
|
51
|
+
"MVARRuntime",
|
|
52
|
+
"OpenClawAdapter",
|
|
53
|
+
# Contracts
|
|
54
|
+
"ActionRequest",
|
|
55
|
+
"ActionDecision",
|
|
56
|
+
# Exceptions
|
|
57
|
+
"ExecutionBlocked",
|
|
58
|
+
"ClawZeroError",
|
|
59
|
+
"ClawZeroConfigError",
|
|
60
|
+
"ClawZeroRuntimeError",
|
|
61
|
+
"UnsupportedFrameworkError",
|
|
62
|
+
# Witness generation
|
|
63
|
+
"WitnessGenerator",
|
|
64
|
+
"generate_witness",
|
|
65
|
+
"get_witness_generator",
|
|
66
|
+
"set_witness_output_dir",
|
|
67
|
+
# Adapters (optional import)
|
|
68
|
+
"adapters",
|
|
69
|
+
]
|