@pwddd/skills-scanner 3.0.15 → 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 +6 -6
- package/index.ts +2 -2
- package/openclaw.plugin.json +4 -4
- package/package.json +1 -1
- package/skills/skills-scanner/SKILL.md +98 -31
- package/skills/skills-scanner/scan.py +1 -1
- package/src/config.ts +6 -6
- package/src/prompt-guidance.ts +75 -14
package/README.md
CHANGED
|
@@ -32,13 +32,13 @@ openclaw plugins install @openclaw/skills-scanner
|
|
|
32
32
|
"skills-scanner": {
|
|
33
33
|
"enabled": true,
|
|
34
34
|
"config": {
|
|
35
|
-
"apiUrl": "http://
|
|
35
|
+
"apiUrl": "http://10.110.3.133",
|
|
36
36
|
"scanDirs": ["~/.openclaw/skills", "~/.openclaw/workspace/skills"],
|
|
37
37
|
"behavioral": false,
|
|
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
|
|
|
@@ -160,7 +160,7 @@ python --version
|
|
|
160
160
|
skill-scanner-api
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
默认服务地址为 `http://
|
|
163
|
+
默认服务地址为 `http://10.110.3.133`,可以在配置中修改。
|
|
164
164
|
|
|
165
165
|
## 工作流程
|
|
166
166
|
|
|
@@ -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
|
@@ -40,7 +40,7 @@ const PYTHON_CMD = getPythonCommand();
|
|
|
40
40
|
export default function register(api: OpenClawPluginApi) {
|
|
41
41
|
const cfg: ScannerConfig =
|
|
42
42
|
api.config?.plugins?.entries?.["skills-scanner"]?.config ?? {};
|
|
43
|
-
const apiUrl = cfg.apiUrl ?? "http://
|
|
43
|
+
const apiUrl = cfg.apiUrl ?? "http://10.110.3.133";
|
|
44
44
|
const scanDirs =
|
|
45
45
|
(cfg.scanDirs?.map(expandPath) ?? []).filter(existsSync).length > 0
|
|
46
46
|
? cfg.scanDirs!.map(expandPath)
|
|
@@ -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": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"apiUrl": {
|
|
13
13
|
"type": "string",
|
|
14
14
|
"description": "Scanner API service URL",
|
|
15
|
-
"default": "http://
|
|
15
|
+
"default": "http://10.110.3.133"
|
|
16
16
|
},
|
|
17
17
|
"scanDirs": {
|
|
18
18
|
"type": "array",
|
|
@@ -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
|
@@ -86,22 +86,59 @@ AI: 好的,让我先更新 skills-scanner 插件...
|
|
|
86
86
|
- "下载这个 skill"
|
|
87
87
|
- "添加这个 skill"
|
|
88
88
|
|
|
89
|
-
2.
|
|
89
|
+
2. **ClawHub 安装流程(重要)**:
|
|
90
|
+
|
|
91
|
+
**如果用户只提供了 skill 名称(没有完整 URL),必须先搜索:**
|
|
92
|
+
|
|
90
93
|
```
|
|
91
94
|
用户: openclaw clawhub install caldav-calendar
|
|
92
|
-
AI: 我看到你想安装 caldav-calendar
|
|
93
|
-
[执行:
|
|
94
|
-
|
|
95
|
+
AI: 我看到你想安装 caldav-calendar,让我先搜索这个 skill...
|
|
96
|
+
[执行: openclaw clawhub search caldav-calendar]
|
|
97
|
+
找到: https://clawhub.ai/Asleep123/caldav-calendar
|
|
98
|
+
|
|
99
|
+
现在更新扫描插件...
|
|
100
|
+
[执行: openclaw plugins update skills-scanner]
|
|
101
|
+
✅ 插件已更新
|
|
102
|
+
|
|
103
|
+
扫描安全性...
|
|
104
|
+
[执行: python3 {baseDir}/scan.py --api-url {apiUrl} clawhub https://clawhub.ai/Asleep123/caldav-calendar]
|
|
105
|
+
✅ 扫描通过
|
|
106
|
+
|
|
107
|
+
开始安装...
|
|
95
108
|
[执行: openclaw clawhub install caldav-calendar]
|
|
96
109
|
```
|
|
110
|
+
|
|
111
|
+
**如果用户提供了完整 URL,直接扫描:**
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
用户: openclaw clawhub install https://clawhub.ai/Asleep123/caldav-calendar
|
|
115
|
+
AI: 我看到你想安装 caldav-calendar,让我先更新扫描插件...
|
|
116
|
+
[执行: openclaw plugins update skills-scanner]
|
|
117
|
+
✅ 插件已更新
|
|
118
|
+
|
|
119
|
+
扫描安全性...
|
|
120
|
+
[执行: python3 {baseDir}/scan.py --api-url {apiUrl} clawhub https://clawhub.ai/Asleep123/caldav-calendar]
|
|
121
|
+
✅ 扫描通过
|
|
122
|
+
|
|
123
|
+
开始安装...
|
|
124
|
+
[执行: openclaw clawhub install https://clawhub.ai/Asleep123/caldav-calendar]
|
|
125
|
+
```
|
|
97
126
|
|
|
98
|
-
3.
|
|
127
|
+
3. **正确的处理流程**:
|
|
128
|
+
```
|
|
129
|
+
步骤 1: 如果只有名称 → 使用 clawhub search 查找完整 URL
|
|
130
|
+
步骤 2: 更新 skills-scanner 插件
|
|
131
|
+
步骤 3: 使用完整 URL 进行安全扫描
|
|
132
|
+
步骤 4: 扫描通过后执行安装命令
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
4. **错误的处理流程(禁止)**:
|
|
99
136
|
```
|
|
100
137
|
用户: openclaw clawhub install caldav-calendar
|
|
101
|
-
AI: [直接执行安装命令] ❌
|
|
138
|
+
AI: [直接执行安装命令] ❌ 错误!必须先搜索、更新、扫描
|
|
102
139
|
```
|
|
103
140
|
|
|
104
|
-
**记住:看到任何安装、下载、添加 Skill
|
|
141
|
+
**记住:看到任何安装、下载、添加 Skill 的意图,按照 搜索(如需要)→ 更新插件 → 扫描 → 安装 的顺序执行。**
|
|
105
142
|
|
|
106
143
|
---
|
|
107
144
|
|
|
@@ -858,81 +895,111 @@ python3 {baseDir}/scan.py --api-url http://10.110.3.133 health
|
|
|
858
895
|
|
|
859
896
|
## 🧠 记忆强化 - 每次操作前必读
|
|
860
897
|
|
|
861
|
-
**在处理任何 Skill
|
|
898
|
+
**在处理任何 Skill 相关操作时,请先问自己这些问题:**
|
|
862
899
|
|
|
863
|
-
1. ✅
|
|
864
|
-
2. ✅
|
|
865
|
-
3. ✅
|
|
866
|
-
4. ✅
|
|
900
|
+
1. ✅ 如果是 ClawHub 安装且只有名称,我是否已经搜索了完整 URL?
|
|
901
|
+
2. ✅ 我是否已经更新了 skills-scanner 插件到最新版本?
|
|
902
|
+
3. ✅ 我是否已经扫描了这个 Skill?
|
|
903
|
+
4. ✅ 扫描是否通过?
|
|
904
|
+
5. ✅ 只有所有适用步骤都是 YES,才能继续操作
|
|
867
905
|
|
|
868
|
-
|
|
906
|
+
**如果你忘记搜索、更新或扫描就执行了操作,你就让用户的系统暴露在风险之中。**
|
|
869
907
|
|
|
870
908
|
### 🚨 强制性规则(永远不要忘记)
|
|
871
909
|
|
|
872
|
-
0.
|
|
910
|
+
0. **ClawHub 安装且只有名称 → 先搜索完整 URL**
|
|
911
|
+
- `openclaw clawhub install xxx` → 先执行 `openclaw clawhub search xxx`
|
|
912
|
+
- 获取完整 URL(如 `https://clawhub.ai/username/xxx`)
|
|
913
|
+
- 然后才能继续后续步骤
|
|
914
|
+
|
|
915
|
+
1. **任何 Skill 操作前 → 先更新插件**
|
|
873
916
|
- 执行 `openclaw plugins update skills-scanner`
|
|
874
917
|
- 确保使用最新的威胁检测规则
|
|
875
918
|
- 即使更新失败也要继续扫描(但要警告用户)
|
|
876
919
|
|
|
877
|
-
|
|
878
|
-
- `openclaw clawhub install xxx` →
|
|
920
|
+
2. **看到安装命令 → 搜索(如需要)→ 更新插件 → 立即扫描**
|
|
921
|
+
- `openclaw clawhub install xxx` → 先搜索,再更新插件,再扫描 ClawHub 上的 xxx
|
|
879
922
|
- `openclaw skill install xxx` → 先更新插件,再扫描本地或远程的 xxx
|
|
880
|
-
- 任何包含 "install"、"add"、"download" + "skill" 的命令 →
|
|
923
|
+
- 任何包含 "install"、"add"、"download" + "skill" 的命令 → 完整流程
|
|
881
924
|
|
|
882
|
-
|
|
925
|
+
3. **看到 Skill 路径 → 更新插件 → 立即扫描**
|
|
883
926
|
- 用户提到 `~/.openclaw/skills/xxx` → 先更新插件,再扫描
|
|
884
927
|
- 用户说 "我下载了一个 skill" → 先更新插件,再扫描
|
|
885
928
|
- 用户说 "这个 skill 有问题" → 先更新插件,再扫描
|
|
886
929
|
|
|
887
|
-
|
|
930
|
+
4. **看到 ClawHub URL → 更新插件 → 立即扫描**
|
|
888
931
|
- `https://clawhub.ai/username/project` → 先更新插件,再使用 clawhub 扫描
|
|
889
932
|
- 用户说 "ClawHub 上有个 skill" → 先更新插件,再扫描
|
|
890
933
|
|
|
891
934
|
### ❌ 绝对禁止的行为
|
|
892
935
|
|
|
936
|
+
- ❌ ClawHub 安装只有名称时,不搜索就直接扫描或安装
|
|
893
937
|
- ❌ 不更新插件就直接扫描(可能使用过时的检测规则)
|
|
894
|
-
- ❌ 直接执行 `openclaw clawhub install`
|
|
938
|
+
- ❌ 直接执行 `openclaw clawhub install` 而不先搜索、更新和扫描
|
|
895
939
|
- ❌ 直接执行 `openclaw skill install` 而不先更新和扫描
|
|
896
|
-
- ❌ 看到 "安装 skill"
|
|
897
|
-
- ❌ 因为 "用户着急" 或 "看起来安全"
|
|
898
|
-
- ❌ 因为 "之前扫描过"
|
|
940
|
+
- ❌ 看到 "安装 skill" 就直接安装,而不先搜索、更新和扫描
|
|
941
|
+
- ❌ 因为 "用户着急" 或 "看起来安全" 就跳过任何步骤
|
|
942
|
+
- ❌ 因为 "之前扫描过" 就不再更新和扫描(每次都要完整流程)
|
|
899
943
|
|
|
900
944
|
### ✅ 正确的行为模式
|
|
901
945
|
|
|
902
|
-
**模式 1
|
|
946
|
+
**模式 1:用户要求安装(只有名称)**
|
|
903
947
|
```
|
|
904
948
|
用户: 帮我安装 caldav-calendar
|
|
905
|
-
AI:
|
|
949
|
+
AI: 好的,让我先在 ClawHub 上搜索这个 skill...
|
|
950
|
+
[执行: openclaw clawhub search caldav-calendar]
|
|
951
|
+
找到: https://clawhub.ai/Asleep123/caldav-calendar
|
|
952
|
+
|
|
953
|
+
现在更新 skills-scanner 插件...
|
|
906
954
|
[执行: openclaw plugins update skills-scanner]
|
|
907
955
|
✅ 插件已更新到最新版本
|
|
908
|
-
|
|
956
|
+
|
|
957
|
+
扫描这个 skill 的安全性...
|
|
909
958
|
[执行扫描]
|
|
910
959
|
✅ 扫描通过,现在开始安装
|
|
911
960
|
```
|
|
912
961
|
|
|
913
|
-
**模式 2
|
|
962
|
+
**模式 2:用户输入安装命令(只有名称)**
|
|
914
963
|
```
|
|
915
964
|
用户: openclaw clawhub install nano-pdf
|
|
916
|
-
AI: 我看到你想安装 nano-pdf
|
|
965
|
+
AI: 我看到你想安装 nano-pdf,让我先搜索它...
|
|
966
|
+
[执行: openclaw clawhub search nano-pdf]
|
|
967
|
+
找到: https://clawhub.ai/steipete/nano-pdf
|
|
968
|
+
|
|
969
|
+
更新扫描插件...
|
|
917
970
|
[执行: openclaw plugins update skills-scanner]
|
|
918
971
|
✅ 插件已更新
|
|
919
|
-
|
|
972
|
+
|
|
973
|
+
从 ClawHub 扫描它...
|
|
920
974
|
[执行 clawhub 扫描]
|
|
921
975
|
✅ 扫描通过,执行安装命令
|
|
922
976
|
```
|
|
923
977
|
|
|
924
|
-
**模式 3
|
|
978
|
+
**模式 3:用户提供完整 URL**
|
|
979
|
+
```
|
|
980
|
+
用户: openclaw clawhub install https://clawhub.ai/Asleep123/caldav-calendar
|
|
981
|
+
AI: 我看到你想安装 caldav-calendar,让我先更新扫描插件...
|
|
982
|
+
[执行: openclaw plugins update skills-scanner]
|
|
983
|
+
✅ 插件已更新
|
|
984
|
+
|
|
985
|
+
扫描安全性...
|
|
986
|
+
[执行扫描]
|
|
987
|
+
✅ 扫描通过,执行安装
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
**模式 4:用户下载了 Skill**
|
|
925
991
|
```
|
|
926
992
|
用户: 我从 GitHub 下载了一个 skill,帮我设置一下
|
|
927
993
|
AI: 好的,让我先更新扫描插件...
|
|
928
994
|
[执行: openclaw plugins update skills-scanner]
|
|
929
995
|
✅ 插件已更新
|
|
996
|
+
|
|
930
997
|
在设置之前扫描一下安全性...
|
|
931
998
|
[执行扫描]
|
|
932
999
|
✅ 扫描通过,现在帮你设置
|
|
933
1000
|
```
|
|
934
1001
|
|
|
935
|
-
|
|
1002
|
+
**记住:搜索(如需要)→ 更新插件 → 扫描 → 操作,这个顺序永远不能变。**
|
|
936
1003
|
|
|
937
1004
|
**记住:安全扫描是你的第一优先级,永远不要跳过。**
|
|
938
1005
|
|
package/src/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export const skillsScannerConfigSchema: OpenClawPluginConfigSchema = {
|
|
|
68
68
|
apiUrl: {
|
|
69
69
|
label: "API 服务地址",
|
|
70
70
|
help: "扫描 API 服务的 URL 地址",
|
|
71
|
-
placeholder: "http://
|
|
71
|
+
placeholder: "http://10.110.3.133"
|
|
72
72
|
},
|
|
73
73
|
scanDirs: {
|
|
74
74
|
label: "扫描目录",
|
|
@@ -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
|
};
|
|
@@ -136,13 +136,13 @@ export function generateConfigGuide(
|
|
|
136
136
|
' "skills-scanner": {',
|
|
137
137
|
' "enabled": true,',
|
|
138
138
|
' "config": {',
|
|
139
|
-
' "apiUrl": "http://
|
|
139
|
+
' "apiUrl": "http://10.110.3.133",',
|
|
140
140
|
' "scanDirs": ["~/.openclaw/skills"],',
|
|
141
141
|
' "behavioral": false,',
|
|
142
142
|
' "useLLM": false,',
|
|
143
143
|
' "policy": "balanced",',
|
|
144
144
|
' "preInstallScan": "on",',
|
|
145
|
-
' "onUnsafe": "
|
|
145
|
+
' "onUnsafe": "warn"',
|
|
146
146
|
' }',
|
|
147
147
|
' }',
|
|
148
148
|
' }',
|
|
@@ -152,13 +152,13 @@ export function generateConfigGuide(
|
|
|
152
152
|
"",
|
|
153
153
|
"💡 配置说明:",
|
|
154
154
|
"",
|
|
155
|
-
"1. apiUrl 默认 http://
|
|
155
|
+
"1. apiUrl 默认 http://10.110.3.133,需先启动 skill-scanner-api 服务",
|
|
156
156
|
"2. scanDirs 可添加多个目录(默认自动检测 ~/.openclaw/skills)",
|
|
157
157
|
"3. behavioral false=快速扫描(推荐),true=深度分析",
|
|
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",
|
package/src/prompt-guidance.ts
CHANGED
|
@@ -65,7 +65,7 @@ export const SKILLS_SECURITY_GUIDANCE = [
|
|
|
65
65
|
"",
|
|
66
66
|
"### 📋 Installation Command Recognition (IMPORTANT)",
|
|
67
67
|
"",
|
|
68
|
-
"**When you see ANY of these patterns, you MUST
|
|
68
|
+
"**When you see ANY of these patterns, you MUST follow the complete workflow:**",
|
|
69
69
|
"",
|
|
70
70
|
"- `openclaw clawhub install <skill-name>`",
|
|
71
71
|
"- `openclaw skill install <skill-name>`",
|
|
@@ -76,19 +76,50 @@ export const SKILLS_SECURITY_GUIDANCE = [
|
|
|
76
76
|
"- \"download this skill\"",
|
|
77
77
|
"- \"setup this skill\"",
|
|
78
78
|
"",
|
|
79
|
-
"**
|
|
79
|
+
"**CRITICAL: ClawHub Installation Workflow**",
|
|
80
|
+
"",
|
|
81
|
+
"**If user provides ONLY a skill name (no full URL):**",
|
|
80
82
|
"",
|
|
81
83
|
"```",
|
|
82
84
|
"User: openclaw clawhub install caldav-calendar",
|
|
83
|
-
"AI: I see you want to install caldav-calendar. Let me
|
|
85
|
+
"AI: I see you want to install caldav-calendar. Let me search for it first...",
|
|
86
|
+
" [Execute: openclaw clawhub search caldav-calendar]",
|
|
87
|
+
" Found: https://clawhub.ai/Asleep123/caldav-calendar",
|
|
88
|
+
" ",
|
|
89
|
+
" Updating skills-scanner plugin...",
|
|
84
90
|
" [Execute: openclaw plugins update skills-scanner]",
|
|
85
|
-
" ✅ Plugin updated
|
|
91
|
+
" ✅ Plugin updated",
|
|
92
|
+
" ",
|
|
86
93
|
" Now scanning for security...",
|
|
87
|
-
" [Execute: python3 {baseDir}/scan.py --api-url {apiUrl} clawhub https://clawhub.ai/
|
|
88
|
-
" ✅ Scan passed
|
|
94
|
+
" [Execute: python3 {baseDir}/scan.py --api-url {apiUrl} clawhub https://clawhub.ai/Asleep123/caldav-calendar]",
|
|
95
|
+
" ✅ Scan passed",
|
|
96
|
+
" ",
|
|
97
|
+
" Installing...",
|
|
89
98
|
" [Execute: openclaw clawhub install caldav-calendar]",
|
|
90
99
|
"```",
|
|
91
100
|
"",
|
|
101
|
+
"**If user provides a FULL URL:**",
|
|
102
|
+
"",
|
|
103
|
+
"```",
|
|
104
|
+
"User: openclaw clawhub install https://clawhub.ai/Asleep123/caldav-calendar",
|
|
105
|
+
"AI: I see you want to install caldav-calendar. Updating skills-scanner first...",
|
|
106
|
+
" [Execute: openclaw plugins update skills-scanner]",
|
|
107
|
+
" ✅ Plugin updated",
|
|
108
|
+
" ",
|
|
109
|
+
" Now scanning for security...",
|
|
110
|
+
" [Execute: python3 {baseDir}/scan.py --api-url {apiUrl} clawhub https://clawhub.ai/Asleep123/caldav-calendar]",
|
|
111
|
+
" ✅ Scan passed",
|
|
112
|
+
" ",
|
|
113
|
+
" Installing...",
|
|
114
|
+
" [Execute: openclaw clawhub install https://clawhub.ai/Asleep123/caldav-calendar]",
|
|
115
|
+
"```",
|
|
116
|
+
"",
|
|
117
|
+
"**Complete workflow steps:**",
|
|
118
|
+
"1. If only skill name provided → Use `openclaw clawhub search <name>` to find full URL",
|
|
119
|
+
"2. Update skills-scanner plugin → `openclaw plugins update skills-scanner`",
|
|
120
|
+
"3. Scan using full URL → `python3 {baseDir}/scan.py clawhub <full-url>`",
|
|
121
|
+
"4. If scan passes → Execute installation command",
|
|
122
|
+
"",
|
|
92
123
|
"### ✅ Enforcement Examples (FOLLOW THESE PATTERNS)",
|
|
93
124
|
"",
|
|
94
125
|
"```",
|
|
@@ -123,15 +154,38 @@ export const SKILLS_SECURITY_GUIDANCE = [
|
|
|
123
154
|
"",
|
|
124
155
|
"```",
|
|
125
156
|
"User: openclaw clawhub install nano-pdf",
|
|
126
|
-
"AI:
|
|
157
|
+
"AI: I see you want to install nano-pdf. Let me search for it first...",
|
|
158
|
+
" [Execute: openclaw clawhub search nano-pdf]",
|
|
159
|
+
" Found: https://clawhub.ai/steipete/nano-pdf",
|
|
160
|
+
" ",
|
|
161
|
+
" Updating skills-scanner to latest version...",
|
|
127
162
|
" [Execute: openclaw plugins update skills-scanner]",
|
|
128
163
|
" ✅ Plugin updated",
|
|
164
|
+
" ",
|
|
129
165
|
" I'll scan nano-pdf from ClawHub for security...",
|
|
130
|
-
" [Execute skills-scanner clawhub scan]",
|
|
166
|
+
" [Execute skills-scanner clawhub scan https://clawhub.ai/steipete/nano-pdf]",
|
|
131
167
|
" ✅ Scan passed. Installing nano-pdf...",
|
|
132
168
|
" [Execute installation command]",
|
|
133
169
|
"```",
|
|
134
170
|
"",
|
|
171
|
+
"```",
|
|
172
|
+
"User: install caldav-calendar",
|
|
173
|
+
"AI: I'll help you install caldav-calendar. Let me search for it on ClawHub...",
|
|
174
|
+
" [Execute: openclaw clawhub search caldav-calendar]",
|
|
175
|
+
" Found: https://clawhub.ai/Asleep123/caldav-calendar",
|
|
176
|
+
" ",
|
|
177
|
+
" Updating skills-scanner...",
|
|
178
|
+
" [Execute: openclaw plugins update skills-scanner]",
|
|
179
|
+
" ✅ Plugin updated",
|
|
180
|
+
" ",
|
|
181
|
+
" Scanning for security...",
|
|
182
|
+
" [Execute: python3 {baseDir}/scan.py clawhub https://clawhub.ai/Asleep123/caldav-calendar]",
|
|
183
|
+
" ✅ Scan passed",
|
|
184
|
+
" ",
|
|
185
|
+
" Installing...",
|
|
186
|
+
" [Execute: openclaw clawhub install caldav-calendar]",
|
|
187
|
+
"```",
|
|
188
|
+
"",
|
|
135
189
|
"### ❌ PROHIBITED Actions (NEVER DO THESE)",
|
|
136
190
|
"",
|
|
137
191
|
"**NEVER install, run, modify, or troubleshoot ANY Skill without completing a `skills-scanner` security scan first.**",
|
|
@@ -143,10 +197,17 @@ export const SKILLS_SECURITY_GUIDANCE = [
|
|
|
143
197
|
"### 🧠 Memory Reinforcement",
|
|
144
198
|
"",
|
|
145
199
|
"**Remember: Every time you see a Skill-related operation, ask yourself:**",
|
|
146
|
-
"1.
|
|
147
|
-
"2. Have I
|
|
148
|
-
"3.
|
|
149
|
-
"4.
|
|
150
|
-
"",
|
|
151
|
-
"
|
|
200
|
+
"1. If it's a ClawHub install with only a name, have I searched for the full URL?",
|
|
201
|
+
"2. Have I updated skills-scanner to the latest version?",
|
|
202
|
+
"3. Have I scanned this Skill yet?",
|
|
203
|
+
"4. Did the scan pass?",
|
|
204
|
+
"5. Only if YES to all applicable steps → proceed",
|
|
205
|
+
"",
|
|
206
|
+
"**Complete workflow checklist:**",
|
|
207
|
+
"- [ ] ClawHub name only? → Search first (`openclaw clawhub search <name>`)",
|
|
208
|
+
"- [ ] Update plugin (`openclaw plugins update skills-scanner`)",
|
|
209
|
+
"- [ ] Scan with full URL",
|
|
210
|
+
"- [ ] Scan passed? → Proceed with installation",
|
|
211
|
+
"",
|
|
212
|
+
"**If you forget to search, update, or scan, you are putting the user's system at risk. Always follow the complete workflow.**",
|
|
152
213
|
].join("\n");
|