@upx-us/shield 0.7.5 → 0.7.6

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.7.6] — 2026-03-13
8
+
9
+ ### Security
10
+ - **URL enforcement switched to allowlist** — plugin traffic is restricted to the Shield ingest endpoint. Any other URL is rejected and replaced with the default. No infrastructure details are disclosed in source.
11
+
12
+ ---
13
+
7
14
  ## [0.7.5] — 2026-03-13
8
15
 
9
16
  ### Security
@@ -139,18 +139,11 @@ function loadCredentials() {
139
139
  };
140
140
  }
141
141
  const CANONICAL_INGEST_URL = 'https://openclaw-shield.upx.com';
142
- const BLOCKED_HOST_PATTERNS = [
143
- /^https?:\/\/uss\.upx\.com/i,
144
- /^https?:\/\/[a-z0-9-]+\.replit\.app/i,
145
- /^https?:\/\/egupx-/i,
146
- ];
147
142
  function enforceIngestUrl(url) {
148
- if (!url)
149
- return CANONICAL_INGEST_URL;
150
- const isBlocked = BLOCKED_HOST_PATTERNS.some(p => p.test(url));
151
- if (isBlocked) {
152
- log.warn('config', `SHIELD_API_URL points to a platform backend ("${url}") — this is not permitted. ` +
153
- `Overriding with ${CANONICAL_INGEST_URL}. Remove SHIELD_API_URL from your config to fix this permanently.`);
143
+ if (!url || !url.startsWith(CANONICAL_INGEST_URL)) {
144
+ if (url && url !== CANONICAL_INGEST_URL) {
145
+ log.warn('config', `SHIELD_API_URL is not a permitted ingest endpoint — overriding with the default. Remove SHIELD_API_URL from your config to fix this permanently.`);
146
+ }
154
147
  return CANONICAL_INGEST_URL;
155
148
  }
156
149
  return url;
@@ -57,11 +57,10 @@ async function callPlatformApi(config, path, params, method) {
57
57
  error: 'Platform API not configured. This feature requires the Shield platform API which is not yet available for your instance. Check your Shield dashboard for updates.',
58
58
  };
59
59
  }
60
- const BLOCKED = [/^https?:\/\/uss\.upx\.com/i, /^https?:\/\/[a-z0-9-]+\.replit\.app/i, /^https?:\/\/egupx-/i];
61
- if (BLOCKED.some(p => p.test(config.apiUrl))) {
60
+ if (!config.apiUrl.startsWith('https://openclaw-shield.upx.com')) {
62
61
  return {
63
62
  ok: false,
64
- error: 'Shield API URL points to a platform backend — direct access is not permitted. Reconfigure Shield to use the ingest endpoint.',
63
+ error: 'Shield API URL is not the permitted ingest endpoint. Reconfigure Shield or contact support.',
65
64
  };
66
65
  }
67
66
  const url = new URL(path, config.apiUrl);
@@ -2,7 +2,7 @@
2
2
  "id": "shield",
3
3
  "name": "OpenClaw Shield",
4
4
  "description": "Real-time security monitoring \u2014 streams enriched, redacted security events to the Shield detection platform.",
5
- "version": "0.7.5",
5
+ "version": "0.7.6",
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.7.5",
3
+ "version": "0.7.6",
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",