@pwddd/skills-scanner 3.0.16 → 3.0.17
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 +4 -4
- package/index.ts +1 -1
- package/openclaw.plugin.json +3 -3
- package/package.json +1 -1
- package/src/config.ts +3 -3
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ openclaw plugins install @openclaw/skills-scanner
|
|
|
38
38
|
"useLLM": false,
|
|
39
39
|
"policy": "balanced",
|
|
40
40
|
"preInstallScan": "on",
|
|
41
|
-
"onUnsafe": "
|
|
41
|
+
"onUnsafe": "warn"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -60,9 +60,9 @@ openclaw plugins install @openclaw/skills-scanner
|
|
|
60
60
|
- `on`: 启用(推荐)
|
|
61
61
|
- `off`: 禁用
|
|
62
62
|
- `onUnsafe`: 发现不安全 Skill 的处理方式
|
|
63
|
-
- `
|
|
63
|
+
- `warn`: 仅警告,不处理(推荐)
|
|
64
|
+
- `quarantine`: 移入隔离目录
|
|
64
65
|
- `delete`: 直接删除
|
|
65
|
-
- `warn`: 仅警告,不处理
|
|
66
66
|
|
|
67
67
|
## 使用方法
|
|
68
68
|
|
|
@@ -269,7 +269,7 @@ MIT
|
|
|
269
269
|
- `useLLM`: 启用 LLM 语义分析
|
|
270
270
|
- `policy`: 扫描策略 (`strict` / `balanced` / `permissive`)
|
|
271
271
|
- `preInstallScan`: 安装前扫描 (`on` / `off`)
|
|
272
|
-
- `onUnsafe`: 不安全时的处理 (`
|
|
272
|
+
- `onUnsafe`: 不安全时的处理 (`warn` / `quarantine` / `delete`)
|
|
273
273
|
- `injectSecurityGuidance`: 向 AI 系统提示词注入安全规则(默认 `true`)
|
|
274
274
|
|
|
275
275
|
## 🆕 AI 安全提示功能
|
package/index.ts
CHANGED
|
@@ -49,7 +49,7 @@ export default function register(api: OpenClawPluginApi) {
|
|
|
49
49
|
const useLLM = cfg.useLLM ?? false;
|
|
50
50
|
const policy = cfg.policy ?? "balanced";
|
|
51
51
|
const preInstallScan = cfg.preInstallScan ?? "on";
|
|
52
|
-
const onUnsafe = cfg.onUnsafe ?? "
|
|
52
|
+
const onUnsafe = cfg.onUnsafe ?? "warn";
|
|
53
53
|
const injectSecurityGuidance = cfg.injectSecurityGuidance ?? true;
|
|
54
54
|
const enablePromptInjectionGuard = cfg.enablePromptInjectionGuard ?? false;
|
|
55
55
|
const enableHighRiskOperationGuard = cfg.enableHighRiskOperationGuard ?? false;
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "skills-scanner",
|
|
3
3
|
"name": "Skills Scanner",
|
|
4
4
|
"description": "Security scanner for OpenClaw Skills to detect potential threats",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.17",
|
|
6
6
|
"author": "pwddd",
|
|
7
7
|
"skills": ["./skills"],
|
|
8
8
|
"configSchema": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"onUnsafe": {
|
|
48
48
|
"type": "string",
|
|
49
49
|
"enum": ["quarantine", "delete", "warn"],
|
|
50
|
-
"description": "Action to take when unsafe Skill is detected: quarantine
|
|
51
|
-
"default": "
|
|
50
|
+
"description": "Action to take when unsafe Skill is detected: quarantine / delete / warn (recommended)",
|
|
51
|
+
"default": "warn"
|
|
52
52
|
},
|
|
53
53
|
"injectSecurityGuidance": {
|
|
54
54
|
"type": "boolean",
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const skillsScannerConfigSchema: OpenClawPluginConfigSchema = {
|
|
|
92
92
|
},
|
|
93
93
|
onUnsafe: {
|
|
94
94
|
label: "不安全处理",
|
|
95
|
-
help: "quarantine
|
|
95
|
+
help: "warn=仅警告(推荐)/ quarantine=隔离 / delete=删除"
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -142,7 +142,7 @@ export function generateConfigGuide(
|
|
|
142
142
|
' "useLLM": false,',
|
|
143
143
|
' "policy": "balanced",',
|
|
144
144
|
' "preInstallScan": "on",',
|
|
145
|
-
' "onUnsafe": "
|
|
145
|
+
' "onUnsafe": "warn"',
|
|
146
146
|
' }',
|
|
147
147
|
' }',
|
|
148
148
|
' }',
|
|
@@ -158,7 +158,7 @@ export function generateConfigGuide(
|
|
|
158
158
|
"4. useLLM false=不使用 LLM(推荐),true=语义分析",
|
|
159
159
|
"5. policy strict / balanced(推荐)/ permissive",
|
|
160
160
|
"6. preInstallScan on=监听新 Skill 并自动扫描(推荐),off=禁用",
|
|
161
|
-
"7. onUnsafe quarantine
|
|
161
|
+
"7. onUnsafe warn=仅警告(推荐),quarantine=隔离,delete=删除",
|
|
162
162
|
"",
|
|
163
163
|
"🚀 快速开始:",
|
|
164
164
|
" 编辑配置文件后重启 Gateway",
|