@dcrays/mobook-security-plugin 2.0.15 → 2.0.16

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/index.js CHANGED
@@ -778,12 +778,12 @@ export default function register(api) {
778
778
  if (toolName === "exec") {
779
779
  const cmd = params.command || "";
780
780
  const openclawUpdatePatterns = [
781
- /npm\s+(i|install|update|up|upgrade)\s+.*\bopenclaw\b/i,
782
- /yarn\s+(global\s+)?add\s+.*\bopenclaw\b/i,
783
- /yarn\s+(global\s+)?upgrade\s+.*\bopenclaw\b/i,
784
- /pnpm\s+(add|update|install|upgrade)\s+.*\bopenclaw\b/i,
785
- /npx\s+.*\bopenclaw\b.*update/i,
786
- /brew\s+(upgrade|reinstall)\s+.*\bopenclaw\b/i,
781
+ // npm: 兼容 flags 在子命令前后的各种写法(npm -g install openclaw / npm install -g openclaw)
782
+ /\bnpm\s+(?:[^&|;]*\s+)?(i|install|update|up|upgrade)\s+(?:[^&|;]*\s+)?\bopenclaw\b/i,
783
+ /\byarn\s+(global\s+)?(add|upgrade)\s+.*\bopenclaw\b/i,
784
+ /\bpnpm\s+(?:[^&|;]*\s+)?(add|update|install|upgrade)\s+(?:[^&|;]*\s+)?\bopenclaw\b/i,
785
+ /\bnpx\s+.*\bopenclaw\b.*update/i,
786
+ /\bbrew\s+(upgrade|reinstall)\s+.*\bopenclaw\b/i,
787
787
  /\bopenclaw\s+update\b/i,
788
788
  /\bopenclaw\s+gateway\s+update\b/i,
789
789
  ];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "mobook-security-plugin",
3
3
  "name": "MoBook 安全防护插件",
4
- "version": "2.0.15",
4
+ "version": "2.0.16",
5
5
  "description": "MoBook 企业级安全插件 - 危险命令分级拦截、敏感信息全渠道脱敏(身份证GB11643/银行卡Luhn校验)、LLM响应拦截、操作审计",
6
6
  "entry": "./index.js",
7
7
  "type": "plugin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/mobook-security-plugin",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "type": "module",
5
5
  "description": "MoBook 企业级安全插件 - 危险命令分级拦截、敏感信息全渠道脱敏(身份证GB11643/银行卡Luhn校验)、LLM响应拦截、操作审计",
6
6
  "main": "index.js",