shroud-privacy 2.0.1 → 2.0.2

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Privacy obfuscation plugin for [OpenClaw](https://openclaw.ai). Detects sensitive data (PII, network infrastructure, credentials) and replaces it with deterministic fake values before anything reaches the LLM. Tool calls still work because Shroud deobfuscates on the way back.
4
4
 
5
- > **Open-source Community Edition** — free to use under MIT license. [Enterprise Edition](#enterprise-edition) available with additional features for teams.
5
+ > **Open-source Community Edition** — free to use under Apache 2.0 license. [Enterprise Edition](#enterprise-edition) available with additional features for teams.
6
6
 
7
7
  ## What it does
8
8
 
@@ -41,6 +41,38 @@ npm install && npm run build
41
41
  bash deploy-local.sh # → OpenClaw (~/.openclaw/extensions/)
42
42
  ```
43
43
 
44
+ ## Updating
45
+
46
+ OpenClaw doesn't have a `plugins update` command yet, so updating requires removing the old install first. A helper script is included:
47
+
48
+ ```bash
49
+ # Update to latest version (preserves your config)
50
+ bash scripts/update-openclaw-plugin.sh
51
+
52
+ # Update to a specific version
53
+ bash scripts/update-openclaw-plugin.sh 2.0.1
54
+ ```
55
+
56
+ The script saves your plugin config from `openclaw.json`, removes the old extension, reinstalls from npm, restores your config, and restarts the gateway.
57
+
58
+ ### Manual update
59
+
60
+ If you prefer to do it manually:
61
+
62
+ ```bash
63
+ # 1. Remove old plugin files
64
+ rm -rf ~/.openclaw/extensions/shroud-privacy
65
+
66
+ # 2. Reinstall (this resets your plugin config to defaults)
67
+ openclaw plugins install shroud-privacy
68
+
69
+ # 3. Re-apply your config in ~/.openclaw/openclaw.json
70
+ # (under plugins.entries."shroud-privacy".config)
71
+
72
+ # 4. Restart
73
+ openclaw gateway restart
74
+ ```
75
+
44
76
  ## Configure
45
77
 
46
78
  Edit `~/.openclaw/openclaw.json` under `plugins.entries."shroud-privacy".config`:
@@ -75,7 +107,6 @@ Out of the box, Shroud:
75
107
  - Detects all entity categories at confidence >= 0.0
76
108
  - Logs audit lines (counts + categories) but **not** proof hashes or fake samples
77
109
  - Never logs raw values, real→fake mappings, or original text
78
- - All enterprise features are opt-in and disabled by default
79
110
 
80
111
  To enable proof hashes and fake samples for deeper audit:
81
112
 
@@ -111,56 +142,12 @@ To enable proof hashes and fake samples for deeper audit:
111
142
  | `logMappings` | boolean | `false` | Log mapping table (debug only) |
112
143
  | `customPatterns` | array | `[]` | User-defined regex detection patterns |
113
144
  | `detectorOverrides` | object | `{}` | Override built-in rules: disable or change confidence per rule name |
114
-
115
- ### Enterprise settings
116
-
117
- | Key | Type | Default | Description |
118
- |-----|------|---------|-------------|
119
- | `tenantId` | string | `""` | Multi-tenant isolation: tenant ID for HMAC keying |
120
- | `lockedCategories` | string[] | `[]` | Compliance mode: categories that MUST be detected |
121
145
  | `maxToolDepth` | number | `10` | Max nested tool call depth before warning |
122
- | `exposureWindow` | number | `60000` | Sliding window (ms) for exposure rate tracking |
123
- | `exposureThresholds` | object | `{}` | Per-category max detections per window |
124
- | `exposureGlobalThreshold` | number | `100` | Global max detections per window |
125
- | `policyFile` | string | `""` | Path to external JSON policy file (allowlist/denylist with glob/regex) |
126
146
  | `redactionLevel` | `"full"` \| `"masked"` \| `"stats"` | `"full"` | Output mode: fake values, partial masking, or category placeholders |
127
- | `sharedStorePath` | string | `""` | File path for cross-agent shared mapping store |
128
- | `sharedStoreTtlMs` | number | `5000` | Cache TTL for shared store reads (ms) |
129
- | `provenanceTagging` | boolean | `false` | Embed `«shroud:category:hash»` markers in output |
130
- | `sessionHandoff` | boolean | `false` | Enable session export/import tools |
131
-
132
- ### Key rotation settings
133
-
134
- | Key | Type | Default | Description |
135
- |-----|------|---------|-------------|
136
- | `keys` | array | `[]` | Versioned keys: `[{version, key, createdAt?, expiresAt?, retired?}]` |
137
- | `activeKeyVersion` | number | `0` | Which key version to use (0 = highest non-expired) |
138
-
139
- ### SIEM integration settings
140
-
141
- | Key | Type | Default | Description |
142
- |-----|------|---------|-------------|
143
- | `siemWebhooks` | array | `[]` | Webhook endpoints: `[{url, authHeader?, headers?, eventTypes?}]` |
144
- | `siemBatchSize` | number | `100` | Max events before auto-flush |
145
- | `siemFlushIntervalMs` | number | `30000` | Flush interval (ms) |
146
- | `siemMaxRetries` | number | `3` | Max retry attempts per flush |
147
- | `siemRetryBackoffMs` | number | `1000` | Initial retry backoff (doubles each retry) |
148
- | `siemEventFormat` | `"json"` \| `"cef"` | `"json"` | Output format for SIEM events |
147
+ | `dryRun` | boolean | `false` | Detect entities but don't replace (testing mode) |
148
+ | `maxStoreMappings` | number | `0` | Max mapping store size with LRU eviction (0 = unlimited) |
149
149
 
150
- ### Hot-reload, session isolation, and monitoring settings
151
-
152
- | Key | Type | Default | Description |
153
- |-----|------|---------|-------------|
154
- | `hotReload` | boolean | `false` | Watch config files and reload detection rules on change |
155
- | `customPatternsFile` | string | `""` | Path to custom patterns JSON file to watch |
156
- | `hotReloadDebounceMs` | number | `1000` | Debounce interval for file change events |
157
- | `sessionIsolation` | boolean | `false` | Per-session isolated stores and mapping engines |
158
- | `monitorEnabled` | boolean | `false` | Active monitoring and alerting pipeline |
159
- | `monitorRateWindowMs` | number | `60000` | Rolling window for rate baseline |
160
- | `monitorSpikeMultiplier` | number | `3.0` | Alert when rate exceeds baseline × multiplier |
161
- | `monitorMaxAlerts` | number | `500` | Max alerts to keep in memory |
162
-
163
- > **Env var overrides:** `SHROUD_SECRET_KEY`, `SHROUD_PERSISTENT_SALT`, `SHROUD_TENANT_ID`, `SHROUD_SHARED_STORE`, `SHROUD_SIEM_WEBHOOK_URL`, `SHROUD_SIEM_WEBHOOK_AUTH`, and `SHROUD_KEYS` (JSON array) override their respective config keys (priority: env var > plugin config > default).
150
+ > **Env var overrides:** `SHROUD_SECRET_KEY` and `SHROUD_PERSISTENT_SALT` override their respective config keys (priority: env var > plugin config > default).
164
151
 
165
152
  ### Detector overrides
166
153
 
@@ -254,12 +241,6 @@ With proof hashes enabled:
254
241
  [shroud][audit] OBFUSCATE req=a3f1bc9e02d4e7f1 | entities=4 | touched=2/5 | blocks=2 | chars=1200->1218 (delta=+18) | modified=YES | byCat=email:1,ip_address:2,hostname:1 | proof_in=8a3c1f0e2b4d proof_out=f7d2a1c9e084 | fakes=[jsmith@corp.net|100.64.0.12|SW-LAB-01]
255
242
  ```
256
243
 
257
- With compliance locking:
258
-
259
- ```
260
- [shroud][audit] OBFUSCATE req=... | ... | COMPLIANCE_WARN=missing:[credit_card]
261
- ```
262
-
263
244
  ### Audit field reference
264
245
 
265
246
  | Field | Meaning |
@@ -276,7 +257,6 @@ With compliance locking:
276
257
  | `proof_in` | Truncated salted SHA-256 of input text |
277
258
  | `proof_out` | Truncated salted SHA-256 of output text |
278
259
  | `fakes` | Sample of fake replacement values (never real values) |
279
- | `COMPLIANCE_WARN` | Missing locked categories (if compliance mode enabled) |
280
260
 
281
261
  ### Note on log duplication
282
262
 
@@ -286,7 +266,7 @@ OpenClaw logs each plugin message twice (once under the plugin subsystem logger,
286
266
 
287
267
  ```bash
288
268
  npm install
289
- npm test # run vitest (303 tests)
269
+ npm test # run vitest (210 tests)
290
270
  npm run build # compile TypeScript
291
271
  npm run lint # type-check without emitting
292
272
  ```
@@ -315,9 +295,7 @@ git push && git push --tags
315
295
 
316
296
  Then create a GitHub Release from the tag (attach the changelog entry as notes).
317
297
 
318
- ### npm publish (not published yet — maintainers only)
319
-
320
- This package is **not published to npm**. The `package.json` is pre-configured so publishing is a single command when the time comes. Do not publish without maintainer approval.
298
+ ### npm publish (maintainers only)
321
299
 
322
300
  ```bash
323
301
  # Pre-flight (always run before publishing)
@@ -347,4 +325,4 @@ The repo includes `.github/workflows/ci.yml` which runs lint + test + build on e
347
325
 
348
326
  ## License
349
327
 
350
- [MIT](LICENSE)
328
+ [Apache 2.0](LICENSE)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "shroud-privacy",
3
3
  "name": "Shroud",
4
- "version": "2.0.0",
4
+ "version": "2.0.2",
5
5
  "description": "Privacy obfuscation with deterministic fake values and deobfuscation — PII never reaches the LLM, tool calls still work",
6
6
  "configSchema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shroud-privacy",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Privacy obfuscation plugin for OpenClaw — detects sensitive data and replaces with deterministic fake values",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",