@f4bioo/berry-shield 2026.3.3-1
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/CONTRIBUTING.md +32 -0
- package/LICENSE +201 -0
- package/README.md +251 -0
- package/SECURITY_AUDIT.md +96 -0
- package/docs/wiki/README.md +108 -0
- package/docs/wiki/decision/README.md +48 -0
- package/docs/wiki/decision/modes.md +176 -0
- package/docs/wiki/decision/patterns.md +137 -0
- package/docs/wiki/decision/posture.md +68 -0
- package/docs/wiki/deploy/README.md +51 -0
- package/docs/wiki/deploy/auditing.md +56 -0
- package/docs/wiki/deploy/build.md +92 -0
- package/docs/wiki/deploy/github-ci-cd.md +107 -0
- package/docs/wiki/deploy/installation.md +348 -0
- package/docs/wiki/engine/README.md +53 -0
- package/docs/wiki/engine/match-engine.md +91 -0
- package/docs/wiki/engine/performance.md +114 -0
- package/docs/wiki/engine/redaction.md +120 -0
- package/docs/wiki/layers/README.md +68 -0
- package/docs/wiki/layers/leaf.md +126 -0
- package/docs/wiki/layers/pulp.md +139 -0
- package/docs/wiki/layers/root.md +130 -0
- package/docs/wiki/layers/stem.md +139 -0
- package/docs/wiki/layers/thorn.md +139 -0
- package/docs/wiki/layers/vine.md +154 -0
- package/docs/wiki/operation/README.md +31 -0
- package/docs/wiki/operation/cli/README.md +122 -0
- package/docs/wiki/operation/cli/add.md +157 -0
- package/docs/wiki/operation/cli/help.md +83 -0
- package/docs/wiki/operation/cli/init.md +52 -0
- package/docs/wiki/operation/cli/list.md +78 -0
- package/docs/wiki/operation/cli/mode.md +93 -0
- package/docs/wiki/operation/cli/policy.md +202 -0
- package/docs/wiki/operation/cli/profile.md +98 -0
- package/docs/wiki/operation/cli/remove.md +96 -0
- package/docs/wiki/operation/cli/report.md +66 -0
- package/docs/wiki/operation/cli/reset.md +99 -0
- package/docs/wiki/operation/cli/rules.md +161 -0
- package/docs/wiki/operation/cli/status.md +103 -0
- package/docs/wiki/operation/cli/test.md +119 -0
- package/docs/wiki/operation/cli/toggle.md +90 -0
- package/docs/wiki/operation/cli/vine.md +193 -0
- package/docs/wiki/operation/web/README.md +27 -0
- package/docs/wiki/tutorials/README.md +40 -0
- package/docs/wiki/tutorials/audit-to-enforce-rollout.md +99 -0
- package/docs/wiki/tutorials/build-custom-rules.md +99 -0
- package/docs/wiki/tutorials/choose-profile.md +91 -0
- package/docs/wiki/tutorials/incident-triage-report.md +99 -0
- package/docs/wiki/tutorials/secure-session.md +115 -0
- package/docs/wiki/tutorials/tune-policy.md +111 -0
- package/openclaw.plugin.json +293 -0
- package/package.json +70 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "berry-shield",
|
|
3
|
+
"name": "Berry Shield",
|
|
4
|
+
"description": "Security plugin that helps to block destructive commands, redact secrets and PII",
|
|
5
|
+
"version": "2026.3.3-1",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"mode": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"enforce",
|
|
14
|
+
"audit"
|
|
15
|
+
],
|
|
16
|
+
"default": "enforce",
|
|
17
|
+
"description": "Enforce blocks/redacts, audit only logs"
|
|
18
|
+
},
|
|
19
|
+
"layers": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"root": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"default": true,
|
|
26
|
+
"description": "Enable Berry.Root (prompt guard)"
|
|
27
|
+
},
|
|
28
|
+
"pulp": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": true,
|
|
31
|
+
"description": "Enable Berry.Pulp (output scanner)"
|
|
32
|
+
},
|
|
33
|
+
"thorn": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": true,
|
|
36
|
+
"description": "Enable Berry.Thorn (tool blocker)"
|
|
37
|
+
},
|
|
38
|
+
"leaf": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": true,
|
|
41
|
+
"description": "Enable Berry.Leaf (input audit)"
|
|
42
|
+
},
|
|
43
|
+
"stem": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": true,
|
|
46
|
+
"description": "Enable Berry.Stem (security gate)"
|
|
47
|
+
},
|
|
48
|
+
"vine": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": true,
|
|
51
|
+
"description": "Enable Berry.Vine (external content guard)"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"policy": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"description": "Root policy injection behavior and adaptive tuning",
|
|
59
|
+
"properties": {
|
|
60
|
+
"profile": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"strict",
|
|
64
|
+
"balanced",
|
|
65
|
+
"minimal"
|
|
66
|
+
],
|
|
67
|
+
"default": "balanced",
|
|
68
|
+
"description": "Injection profile: strict=always full, balanced=full then adaptive, minimal=silent unless triggered"
|
|
69
|
+
},
|
|
70
|
+
"adaptive": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"properties": {
|
|
74
|
+
"staleAfterMinutes": {
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"minimum": 1,
|
|
77
|
+
"default": 30,
|
|
78
|
+
"description": "Session inactivity window (minutes) to treat a conversation as stale"
|
|
79
|
+
},
|
|
80
|
+
"escalationTurns": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 1,
|
|
83
|
+
"default": 3,
|
|
84
|
+
"description": "Number of turns to force full policy after a denied security event"
|
|
85
|
+
},
|
|
86
|
+
"heartbeatEveryTurns": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"default": 0,
|
|
90
|
+
"description": "Inject short reminder every N turns (0 disables heartbeat)"
|
|
91
|
+
},
|
|
92
|
+
"allowGlobalEscalation": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false,
|
|
95
|
+
"description": "Allow escalation without session identity (not recommended for multi-session environments)"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"retention": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"properties": {
|
|
103
|
+
"maxEntries": {
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"minimum": 1,
|
|
106
|
+
"default": 10000,
|
|
107
|
+
"description": "Maximum adaptive session entries kept in memory"
|
|
108
|
+
},
|
|
109
|
+
"ttlSeconds": {
|
|
110
|
+
"type": "integer",
|
|
111
|
+
"minimum": 1,
|
|
112
|
+
"default": 86400,
|
|
113
|
+
"description": "Adaptive session state TTL in seconds"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"vine": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"description": "External-content guardrail tuning for Berry.Vine",
|
|
123
|
+
"properties": {
|
|
124
|
+
"mode": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": [
|
|
127
|
+
"balanced",
|
|
128
|
+
"strict"
|
|
129
|
+
],
|
|
130
|
+
"default": "balanced",
|
|
131
|
+
"description": "balanced = conservative on unknown, strict = block sensitive actions on unknown/external risk"
|
|
132
|
+
},
|
|
133
|
+
"retention": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"properties": {
|
|
137
|
+
"maxEntries": {
|
|
138
|
+
"type": "integer",
|
|
139
|
+
"minimum": 1,
|
|
140
|
+
"default": 10000,
|
|
141
|
+
"description": "Maximum Vine session entries kept in memory"
|
|
142
|
+
},
|
|
143
|
+
"ttlSeconds": {
|
|
144
|
+
"type": "integer",
|
|
145
|
+
"minimum": 1,
|
|
146
|
+
"default": 86400,
|
|
147
|
+
"description": "Vine runtime state TTL in seconds"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"thresholds": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"properties": {
|
|
155
|
+
"externalSignalsToEscalate": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 1,
|
|
158
|
+
"default": 1,
|
|
159
|
+
"description": "Number of external signals required to mark session risk"
|
|
160
|
+
},
|
|
161
|
+
"forcedGuardTurns": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 1,
|
|
164
|
+
"default": 3,
|
|
165
|
+
"description": "Number of guarded turns after escalation"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"toolAllowlist": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"default": [],
|
|
175
|
+
"description": "Tool names exempt from Vine escalation"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"customRules": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"description": "Custom rules synchronized across CLI and Web settings",
|
|
183
|
+
"properties": {
|
|
184
|
+
"secrets": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"description": "Custom secret redaction entries",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"properties": {
|
|
191
|
+
"name": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"pattern": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"placeholder": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"enabled": {
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"default": true
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": [
|
|
206
|
+
"name",
|
|
207
|
+
"pattern",
|
|
208
|
+
"placeholder",
|
|
209
|
+
"enabled"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"default": []
|
|
213
|
+
},
|
|
214
|
+
"sensitiveFiles": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"description": "Additional sensitive file path regex entries",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"properties": {
|
|
221
|
+
"name": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"pattern": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"enabled": {
|
|
228
|
+
"type": "boolean",
|
|
229
|
+
"default": true
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"required": [
|
|
233
|
+
"name",
|
|
234
|
+
"pattern",
|
|
235
|
+
"enabled"
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
"default": []
|
|
239
|
+
},
|
|
240
|
+
"destructiveCommands": {
|
|
241
|
+
"type": "array",
|
|
242
|
+
"description": "Additional destructive command regex entries",
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"properties": {
|
|
247
|
+
"name": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"pattern": {
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
"enabled": {
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"default": true
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"name",
|
|
260
|
+
"pattern",
|
|
261
|
+
"enabled"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"default": []
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"default": {
|
|
268
|
+
"secrets": [],
|
|
269
|
+
"sensitiveFiles": [],
|
|
270
|
+
"destructiveCommands": []
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"uiHints": {
|
|
276
|
+
"customRules.secrets[].name": {
|
|
277
|
+
"label": "Name",
|
|
278
|
+
"sensitive": false
|
|
279
|
+
},
|
|
280
|
+
"customRules.secrets[].pattern": {
|
|
281
|
+
"label": "Pattern",
|
|
282
|
+
"sensitive": true
|
|
283
|
+
},
|
|
284
|
+
"customRules.secrets[].placeholder": {
|
|
285
|
+
"label": "Placeholder",
|
|
286
|
+
"sensitive": false
|
|
287
|
+
},
|
|
288
|
+
"customRules.secrets[].enabled": {
|
|
289
|
+
"label": "Enabled",
|
|
290
|
+
"sensitive": false
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@f4bioo/berry-shield",
|
|
3
|
+
"version": "2026.3.3-1",
|
|
4
|
+
"description": "OpenClaw plugin for policy checks, command/file blocking, and sensitive-data redaction.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"openclaw",
|
|
7
|
+
"plugin",
|
|
8
|
+
"security",
|
|
9
|
+
"guardrail",
|
|
10
|
+
"pii",
|
|
11
|
+
"redaction",
|
|
12
|
+
"audit",
|
|
13
|
+
"safety",
|
|
14
|
+
"cli"
|
|
15
|
+
],
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"author": "F4bioo",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/F4bioo/berry-shield.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/F4bioo/berry-shield/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/F4bioo/berry-shield#readme",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20.0.0"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist/",
|
|
32
|
+
"docs/wiki/",
|
|
33
|
+
"openclaw.plugin.json",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"SECURITY_AUDIT.md",
|
|
37
|
+
"CONTRIBUTING.md"
|
|
38
|
+
],
|
|
39
|
+
"openclaw": {
|
|
40
|
+
"extensions": [
|
|
41
|
+
"./dist/index.js"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
48
|
+
"build": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:openclaw/plugin-sdk --target=node20",
|
|
49
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
50
|
+
"//release": "Preflight gates run before version bump",
|
|
51
|
+
"release:preflight": "npm run build && npm run typecheck && npm test && npm run wiki:claim",
|
|
52
|
+
"release": "npm run release:preflight && npm run version:update",
|
|
53
|
+
"version:update": "npx ts-node --esm scripts/update-version.ts",
|
|
54
|
+
"update-patterns": "npx ts-node --esm scripts/update-patterns.ts",
|
|
55
|
+
"wiki:claim": "npx ts-node --esm scripts/doc-sanity.ts"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"openclaw": "^2026.2.3-1"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@clack/prompts": "^0.7.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@iarna/toml": "^2.2.5",
|
|
65
|
+
"@types/node": "^25.2.2",
|
|
66
|
+
"esbuild": "^0.27.3",
|
|
67
|
+
"typescript": "^5.3.0",
|
|
68
|
+
"vitest": "^4.0.18"
|
|
69
|
+
}
|
|
70
|
+
}
|