@upx-us/shield 0.2.12-beta → 0.2.14-beta

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.

Potentially problematic release.


This version of @upx-us/shield might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,43 +1,84 @@
1
1
  # OpenClaw Shield
2
2
 
3
3
  > **This plugin requires an active OpenClaw Shield subscription provided by UPX.**
4
- > For more information, visit [upx.com](https://upx.com).
4
+ > For access or more information, visit [upx.com](https://upx.com).
5
5
 
6
6
  Real-time security monitoring for your OpenClaw agents — powered by the UPX Shield detection platform.
7
7
 
8
8
  Shield runs silently alongside your OpenClaw Gateway, captures agent activity, and streams it to the Shield platform where security rules, playbooks, and case management give your team full visibility.
9
9
 
10
- 📖 **New?** See the [Getting Started guide](https://github.com/UPX-US/openclaw-shield-plugin/blob/main/docs/GETTING_STARTED.md) for a step-by-step walkthrough.
10
+ ---
11
11
 
12
- ## Install
12
+ ## Prerequisites
13
+
14
+ - **OpenClaw Gateway** installed and running (`openclaw gateway status`)
15
+ - An **installation key** provided by your Shield administrator (looks like: `A1B2C3D4E5F6...`)
16
+
17
+ ---
18
+
19
+ ## Step 1 — Install the plugin
13
20
 
14
21
  ```bash
15
22
  openclaw plugins install @upx-us/shield@beta
16
23
  ```
17
24
 
18
- Restart the Gateway after install. Shield starts automatically.
25
+ ---
19
26
 
20
- ## Activate
27
+ ## Step 2 — Activate Shield
21
28
 
22
- You'll need an **installation key** from your Shield admin. Run the setup wizard:
29
+ Run the setup wizard:
23
30
 
24
31
  ```bash
25
32
  npx -p @upx-us/shield@beta shield-setup
26
33
  ```
27
34
 
35
+ The wizard will ask for your installation key:
36
+
28
37
  ```
29
38
  🛡️ OpenClaw Shield Setup
30
39
  ==========================
31
40
 
32
- Installation Key (from Shield portal): ████████████████
41
+ Installation Key (from Shield portal): ████████████████████████
42
+
33
43
  Connecting... ok
34
44
  Registering instance... ok
35
-
36
45
  ✅ Shield activated!
37
46
  Restart your OpenClaw Gateway to start monitoring.
38
47
  ```
39
48
 
40
- That's it. Your instance is now registered and events will start flowing to the Shield platform.
49
+ > **Note:** Each installation key is single-use. If the key is rejected, request a new one from your administrator.
50
+
51
+ ---
52
+
53
+ ## Step 3 — Restart the Gateway
54
+
55
+ ```bash
56
+ openclaw gateway restart
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Step 4 — Verify it's running
62
+
63
+ ```bash
64
+ openclaw shield status
65
+ ```
66
+
67
+ Expected output:
68
+
69
+ ```
70
+ 🛡️ Shield Status
71
+ ─────────────────────────────
72
+ Running: true
73
+ Version: 0.2.x-beta
74
+ Last poll: a few seconds ago
75
+ Events sent: 12
76
+ Failures: 0
77
+ ```
78
+
79
+ Once `Running: true` and `Last poll` is recent, Shield is live.
80
+
81
+ ---
41
82
 
42
83
  ## What data is collected
43
84
 
@@ -48,49 +89,47 @@ Shield captures **agent activity events** — the things your OpenClaw agent doe
48
89
  | Shell commands | `git status`, `npm install`, `curl` calls |
49
90
  | File operations | Read, write, edit — path and action only |
50
91
  | Web requests | URLs fetched, search queries, browser actions |
51
- | Messages sent | Channel, direction — never message content |
92
+ | Messages sent | Channel and direction — never message content |
52
93
  | Sessions spawned | Sub-agent launches |
53
94
 
54
95
  Shield does **not** collect:
55
96
  - Message content or conversation history
56
97
  - File contents
57
- - Credentials or secrets (see Redaction below)
58
- - Anything outside of OpenClaw agent activity
98
+ - Credentials or secrets (automatically redacted before transmission)
99
+
100
+ ---
59
101
 
60
102
  ## How your data is protected
61
103
 
62
- **Redaction** runs locally before any data leaves your machine. The redactor automatically strips:
104
+ **Redaction** runs locally before any data leaves your machine. The redactor automatically strips API keys, tokens, passwords, and any string matching known secret patterns — replacing them with `[REDACTED]`.
63
105
 
64
- - API keys, tokens, and passwords
65
- - File paths that look like sensitive locations (`~/.ssh`, credential files)
66
- - Usernames and hostnames from command output
67
- - Any string matching known secret patterns
106
+ **Transmission** uses HTTPS with TLS 1.2+. Each instance has a unique signing key — your data is tied to your instance only and cannot be replayed or forged.
68
107
 
69
- You can verify what's being sent at any time by running:
108
+ **Credentials** are stored locally at `~/.openclaw/shield/config.env` (mode 0600 readable only by your user) and are never transmitted.
70
109
 
71
- ```bash
72
- openclaw shield status
73
- ```
110
+ ---
74
111
 
75
- **Transmission** uses HTTPS with TLS 1.2+. Each instance has a unique signing key — your data is tied to your instance only and cannot be replayed or forged.
112
+ ## Troubleshooting
113
+
114
+ | Symptom | What to do |
115
+ |---|---|
116
+ | `Running: false` after restart | Check `openclaw shield status` for failure count. Re-run the setup wizard if credentials are missing. |
117
+ | High failure count | Shield backs off automatically. Run `openclaw shield flush` to retry immediately. |
118
+ | Installation key rejected | Keys are single-use. Request a new one from your administrator. |
119
+ | Events not appearing in portal | Allow 1–2 minutes after first activation. Check that `Last poll` is recent. |
76
120
 
77
- **Credentials** are stored locally at `~/.openclaw/shield/config.env` (mode 0600 — readable only by your user). They are never transmitted.
121
+ ---
78
122
 
79
- ## Check status
123
+ ## Uninstalling
80
124
 
81
125
  ```bash
82
- openclaw shield status
126
+ openclaw plugins uninstall shield
83
127
  ```
84
128
 
85
- ```
86
- Shield v0.2.1-beta (12s ago)
87
- Running: true
88
- Last poll: 2026-02-22T22:40:31Z
89
- Events: 1,204
90
- Quarantine: 0
91
- Failures: 0
92
- ```
129
+ Stops the monitoring bridge and removes the plugin. Your instance record on the platform is preserved for audit purposes.
130
+
131
+ ---
93
132
 
94
133
  ## Need help?
95
134
 
96
- Contact your Shield administrator or reach out to UPX support.
135
+ Contact your Shield administrator or reach out to UPX support at [upx.com](https://upx.com).
package/dist/src/index.js CHANGED
@@ -134,6 +134,12 @@ async function poll() {
134
134
  }
135
135
  }
136
136
  else {
137
+ // No new entries this poll — but still commit cursors so that
138
+ // initCursorsForDir positions (set to current file sizes) are
139
+ // persisted. Without this, the next poll re-initialises cursors
140
+ // to the NEW current size and silently skips any events that
141
+ // arrived between polls.
142
+ (0, fetcher_1.commitCursors)(config, []);
137
143
  consecutiveFailures = 0;
138
144
  }
139
145
  }
@@ -49,6 +49,9 @@ const log = __importStar(require("./log"));
49
49
  const version_1 = require("./version");
50
50
  const BATCH_SIZE = 100;
51
51
  exports.REQUEST_TIMEOUT_MS = 30_000;
52
+ /** Minimum delay between consecutive batch POSTs (ms). Prevents Cloud Armor rate-limit
53
+ * from triggering during backfill bursts. 200ms ≈ 5 req/s = 300 req/min (well under 600/min limit). */
54
+ const INTER_BATCH_DELAY_MS = 200;
52
55
  function errMsg(err) {
53
56
  return err instanceof Error ? err.message : String(err);
54
57
  }
@@ -97,6 +100,9 @@ async function sendEvents(events, config) {
97
100
  }
98
101
  const results = [];
99
102
  for (let i = 0; i < events.length; i += BATCH_SIZE) {
103
+ // Throttle between batches to avoid Cloud Armor rate-limit during backfill
104
+ if (i > 0)
105
+ await new Promise(r => setTimeout(r, INTER_BATCH_DELAY_MS));
100
106
  const batch = events.slice(i, i + BATCH_SIZE);
101
107
  const batchNum = Math.floor(i / BATCH_SIZE) + 1;
102
108
  const payload = JSON.stringify({ entries: batch });
@@ -2,7 +2,7 @@
2
2
  "id": "shield",
3
3
  "name": "OpenClaw Shield",
4
4
  "description": "Real-time security monitoring — streams enriched, redacted security events to the Shield detection platform.",
5
- "version": "0.2.12-beta",
5
+ "version": "0.2.14-beta",
6
6
  "skills": [
7
7
  "./skills"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upx-us/shield",
3
- "version": "0.2.12-beta",
3
+ "version": "0.2.14-beta",
4
4
  "description": "Security monitoring plugin for OpenClaw agents — streams enriched security events to the Shield detection platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",