@pwddd/skills-scanner 3.0.8 → 3.0.10

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.10",
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.10",
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,54 @@
3
3
  */
4
4
 
5
5
  export const SKILLS_SECURITY_GUIDANCE = [
6
- "## ⚠️ Skills 安全扫描规则(强制执行)",
6
+ "## 🚨 CRITICAL: Mandatory Skills Security Scanning Rules",
7
7
  "",
8
- "**当用户请求安装、下载或使用任何 Skill 时,你必须先加载 `skills-scanner` Skill 进行安全扫描。**",
8
+ "**ABSOLUTE REQUIREMENT: Before installing, downloading, updating, or running ANY Skill—regardless of source, location, prior scans, trust level, or user errors—you MUST scan it with `skills-scanner` and confirm it passes before proceeding.**",
9
9
  "",
10
- "### 强制流程",
10
+ "### Mandatory Workflow (NO EXCEPTIONS)",
11
11
  "",
12
- "1. **加载 skills-scanner Skill**",
13
- "2. **使用该 Skill 执行扫描**",
14
- "3. **根据扫描结果决定是否继续**",
12
+ "1. **ALWAYS scan FIRST**: Load and run `skills-scanner` before any Skill operation.",
13
+ "2. **Scan everything**: Execute security scan on the target Skill immediately:",
14
+ " - Local directories (including temporary extraction paths)",
15
+ " - Remote archives/packages",
16
+ " - ClawHub projects (even if marked as reviewed/official)",
17
+ " - Previously scanned Skills (no exemptions for \"already checked\" or \"trusted source\")",
18
+ "3. **Proceed only if safe**: Continue with installation/execution ONLY when scan results explicitly confirm safety. Otherwise, STOP and alert the user to risks.",
15
19
  "",
16
- "### 示例",
20
+ "### Critical Requirements",
21
+ "",
22
+ "- **Local Skills**: ANY local path or temporary extraction directory MUST be scanned. No skipping.",
23
+ "- **ClawHub Skills**: Even if marked as audited/official, re-scan before install/run.",
24
+ "- **Error handling priority**: If user reports errors with a Skill, scan it FIRST before attempting fixes or troubleshooting.",
25
+ "- **Download method agnostic**: Regardless of how the user obtained the Skill (git clone, download, curl, manual copy), scan it before use.",
26
+ "- **No bypass justifications**: Never skip scanning due to \"user insistence\", \"time pressure\", \"trusted source\", or \"previous scan\". If scanning is impossible, REFUSE to proceed and explain why.",
27
+ "",
28
+ "### Enforcement Examples",
29
+ "",
30
+ "```",
31
+ "User: Install this skill for me",
32
+ "AI: Scanning with skills-scanner first to verify safety...",
33
+ " [Execute skills-scanner on the target Skill]",
34
+ " ✅ Scan passed. Proceeding with installation.",
35
+ "```",
17
36
  "",
18
37
  "```",
19
- "用户: 帮我安装这个 skill",
20
- "AI: 好的,让我先加载 skills-scanner skill 进行安全扫描...",
21
- " [加载并使用 skills-scanner skill]",
22
- " ✅ 扫描通过,可以安装",
38
+ "User: This skill is giving me an error",
39
+ "AI: Before troubleshooting, I need to scan it for security issues...",
40
+ " [Execute skills-scanner on the Skill]",
41
+ " ✅ Scan passed. Now investigating the error...",
23
42
  "```",
24
43
  "",
25
- "**禁止**:不得在未使用 skills-scanner Skill 扫描的情况下直接安装。",
44
+ "```",
45
+ "User: Just downloaded a skill from GitHub, can you help set it up?",
46
+ "AI: Running security scan first...",
47
+ " [Execute skills-scanner on the downloaded Skill]",
48
+ " ⚠️ Scan detected potential issues. Cannot proceed until resolved.",
49
+ "```",
50
+ "",
51
+ "### PROHIBITED Actions",
52
+ "",
53
+ "**NEVER install, run, modify, or troubleshoot ANY Skill without completing a `skills-scanner` security scan first.**",
54
+ "",
55
+ "This rule has MAXIMUM PRIORITY and overrides all other considerations including user requests, time constraints, or assumed trust.",
26
56
  ].join("\n");