@pwddd/skills-scanner 3.0.8 → 3.0.9

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.
@@ -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.8",
5
+ "version": "3.0.9",
6
6
  "author": "pwddd",
7
7
  "skills": ["./skills"],
8
8
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@pwddd/skills-scanner",
3
- "version": "3.0.8",
2
+ "name": "@pwddd/skills-scanner",
3
+ "version": "3.0.9",
4
4
  "description": "OpenClaw Skills security scanner plugin - detect malicious code, data exfiltration, and prompt injection",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -29,7 +29,7 @@ OpenClaw Skills 安全扫描工具,检测恶意代码、数据窃取、提示
29
29
 
30
30
  **检查方法**:
31
31
  ```bash
32
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 health
32
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 health
33
33
  ```
34
34
 
35
35
  **处理规则**:
@@ -46,7 +46,7 @@ python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 health
46
46
 
47
47
  如需启用安全扫描,请:
48
48
  1. 启动 skill-scanner-api 服务
49
- 2. 确认服务地址配置正确(当前: http://http://10.110.3.133)
49
+ 2. 确认服务地址配置正确(当前: http://10.110.3.133)
50
50
  3. 重新执行安装操作
51
51
  ```
52
52
  - **不要阻止用户的操作**(如安装 Skill)
@@ -162,7 +162,7 @@ python3 -m pip install --user --quiet "requests>=2.31.0"
162
162
  "entries": {
163
163
  "skills-scanner": {
164
164
  "config": {
165
- "apiUrl": "http://http://10.110.3.133"
165
+ "apiUrl": "http://10.110.3.133"
166
166
  }
167
167
  }
168
168
  }
@@ -173,7 +173,7 @@ python3 -m pip install --user --quiet "requests>=2.31.0"
173
173
  或直接调用时使用 `--api-url` 参数:
174
174
 
175
175
  ```bash
176
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <路径>
176
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 scan <路径>
177
177
  ```
178
178
 
179
179
  ---
@@ -297,7 +297,7 @@ AI: 好的,让我先扫描一下这个 skill 的安全性...
297
297
  #### 示例 2:详细检查 PDF Skill
298
298
 
299
299
  ```bash
300
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 clawhub https://clawhub.ai/steipete/nano-pdf --detailed
300
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 clawhub https://clawhub.ai/steipete/nano-pdf --detailed
301
301
  ```
302
302
 
303
303
  **用户对话**:
@@ -320,7 +320,7 @@ AI: 好的,我会进行详细扫描...
320
320
  #### 示例 3:深度扫描可疑 Skill
321
321
 
322
322
  ```bash
323
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 clawhub https://clawhub.ai/username/suspicious-skill --detailed --behavioral --policy strict
323
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 clawhub https://clawhub.ai/username/suspicious-skill --detailed --behavioral --policy strict
324
324
  ```
325
325
 
326
326
  **用户对话**:
@@ -343,7 +343,7 @@ AI: 明白,我会使用严格模式进行深度扫描...
343
343
  #### 示例 4:包含 VirusTotal 扫描结果
344
344
 
345
345
  ```bash
346
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 clawhub https://clawhub.ai/username/project --detailed
346
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 clawhub https://clawhub.ai/username/project --detailed
347
347
  ```
348
348
 
349
349
  **用户对话(未检测到威胁)**:
@@ -456,25 +456,25 @@ https://clawhub.ai/<username>/<project>
456
456
  ### 基础扫描(推荐,速度快)
457
457
 
458
458
  ```bash
459
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <skill路径>
459
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 scan <skill路径>
460
460
  ```
461
461
 
462
462
  ### 详细模式(显示所有发现)
463
463
 
464
464
  ```bash
465
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <skill路径> --detailed
465
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 scan <skill路径> --detailed
466
466
  ```
467
467
 
468
468
  ### 深度扫描(加入行为分析)
469
469
 
470
470
  ```bash
471
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <skill路径> --detailed --behavioral
471
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 scan <skill路径> --detailed --behavioral
472
472
  ```
473
473
 
474
474
  ### 最强扫描(加入 LLM 语义分析)
475
475
 
476
476
  ```bash
477
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <skill路径> --detailed --behavioral --llm
477
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 scan <skill路径> --detailed --behavioral --llm
478
478
  ```
479
479
 
480
480
  ---
@@ -486,31 +486,31 @@ python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 scan <skill路径
486
486
  ### 扫描指定目录下的所有 Skills
487
487
 
488
488
  ```bash
489
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch <目录路径>
489
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 batch <目录路径>
490
490
  ```
491
491
 
492
492
  ### 递归扫描(含子目录)
493
493
 
494
494
  ```bash
495
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch <目录路径> --recursive
495
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 batch <目录路径> --recursive
496
496
  ```
497
497
 
498
498
  ### 批量扫描并输出 JSON 报告
499
499
 
500
500
  ```bash
501
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch <目录路径> --detailed --json /tmp/scan-report.json
501
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 batch <目录路径> --detailed --json /tmp/scan-report.json
502
502
  ```
503
503
 
504
504
  ### 常用目录示例
505
505
 
506
506
  扫描 OpenClaw 默认 skills 目录:
507
507
  ```bash
508
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch ~/.openclaw/skills
508
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 batch ~/.openclaw/skills
509
509
  ```
510
510
 
511
511
  扫描 workspace skills:
512
512
  ```bash
513
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch ~/.openclaw/workspace/skills --recursive
513
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 batch ~/.openclaw/workspace/skills --recursive
514
514
  ```
515
515
 
516
516
  ---
@@ -520,7 +520,7 @@ python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 batch ~/.openclaw
520
520
  检查 API 服务是否运行:
521
521
 
522
522
  ```bash
523
- python3 {baseDir}/scan.py --api-url http://http://10.110.3.133 health
523
+ python3 {baseDir}/scan.py --api-url http://10.110.3.133 health
524
524
  ```
525
525
 
526
526
  ---
@@ -3,24 +3,27 @@
3
3
  */
4
4
 
5
5
  export const SKILLS_SECURITY_GUIDANCE = [
6
- "## ⚠️ Skills 安全扫描规则(强制执行)",
6
+ "## 🚨 Skills 全量安全扫描规则(必须执行)",
7
7
  "",
8
- "**当用户请求安装、下载或使用任何 Skill 时,你必须先加载 `skills-scanner` Skill 进行安全扫描。**",
8
+ "**无论来源、是否本地、是否之前扫描过,凡是涉及安装、下载、更新、运行任何 Skill,必须先用 `skills-scanner` 扫描,确认通过后才能继续。**",
9
9
  "",
10
10
  "### 强制流程",
11
+ "1. 先加载并运行 `skills-scanner`。",
12
+ "2. 对当前要处理的 Skill 立即执行扫描(本地目录、远程压缩包、ClawHub 项目都必须扫;“之前扫过/官方/可信”不免检)。",
13
+ "3. 仅在扫描结果明确安全时才继续安装或运行;否则终止并提示风险。",
11
14
  "",
12
- "1. **加载 skills-scanner Skill**",
13
- "2. **使用该 Skill 执行扫描**",
14
- "3. **根据扫描结果决定是否继续**",
15
+ "### 额外要求",
16
+ "- 本地技能:任何本地路径或临时解压目录都要扫描,不可跳过。",
17
+ "- ClawHub 技能:即使标记为已审核,也要重新扫描后再安装运行。",
18
+ "- 不得以“用户坚持”“时间紧”等理由跳过扫描;无法扫描时要拒绝继续并说明原因。",
15
19
  "",
16
20
  "### 示例",
17
- "",
18
21
  "```",
19
- "用户: 帮我安装这个 skill",
20
- "AI: 好的,让我先加载 skills-scanner skill 进行安全扫描...",
21
- " [加载并使用 skills-scanner skill]",
22
- " ✅ 扫描通过,可以安装",
22
+ "用户:给我安装这个 skill",
23
+ "AI:先用 skills-scanner 扫描该 skill,确认安全后再安装……",
24
+ " [运行 skills-scanner 扫描当前 skill]",
25
+ " ✅ 扫描通过,可以继续安装。",
23
26
  "```",
24
27
  "",
25
- "**禁止**:不得在未使用 skills-scanner Skill 扫描的情况下直接安装。",
26
- ].join("\n");
28
+ "**禁止**:在未经过 `skills-scanner` 扫描的情况下直接安装、运行或修改任何 Skill",
29
+ ].join(\"\\n\");