@pwddd/skills-scanner 3.0.18 → 3.0.19

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 CHANGED
@@ -386,7 +386,7 @@ openclaw skills-scanner health
386
386
  3. **ClawHub 扫描**(聊天命令/CLI):直接扫描 ClawHub 上的 Skill
387
387
  4. **CLI 命令扫描**:通过命令行工具扫描
388
388
  5. **自动文件监控**:实时监控目录,自动扫描新 Skill
389
- 6. **定时任务扫描**:每天 08:00 自动生成日报
389
+ 6. **定时任务扫描**:每周一 12:05 自动生成周报
390
390
  7. **RPC 方法扫描**:供其他插件或程序调用
391
391
  8. **AI 主动扫描**:AI 在用户请求安装 Skills 时自动扫描(需启用 `injectSecurityGuidance`)
392
392
 
@@ -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.18",
5
+ "version": "3.0.19",
6
6
  "author": "pwddd",
7
7
  "skills": ["./skills"],
8
8
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pwddd/skills-scanner",
3
- "version": "3.0.18",
3
+ "version": "3.0.19",
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",
package/src/commands.ts CHANGED
@@ -69,16 +69,7 @@ export function createCommandHandlers(
69
69
  const recursive = parts.includes("--recursive");
70
70
  const isReport = parts.includes("--report");
71
71
 
72
- if (!targetPath) {
73
- return { text: "⚠️ 请指定扫描路径" };
74
- }
75
-
76
- if (!existsSync(targetPath)) {
77
- return { text: `⚠️ 路径不存在: ${targetPath}` };
78
- }
79
-
80
- const isSingleSkill = existsSync(join(targetPath, "SKILL.md"));
81
-
72
+ // Report mode: use configured scanDirs
82
73
  if (isReport) {
83
74
  if (scanDirs.length === 0) {
84
75
  return { text: "⚠️ 未找到可扫描目录,请检查配置" };
@@ -94,7 +85,20 @@ export function createCommandHandlers(
94
85
  scanScript
95
86
  );
96
87
  return { text: report };
97
- } else if (isSingleSkill) {
88
+ }
89
+
90
+ // Regular scan mode: require path
91
+ if (!targetPath) {
92
+ return { text: "⚠️ 请指定扫描路径" };
93
+ }
94
+
95
+ if (!existsSync(targetPath)) {
96
+ return { text: `⚠️ 路径不存在: ${targetPath}` };
97
+ }
98
+
99
+ const isSingleSkill = existsSync(join(targetPath, "SKILL.md"));
100
+
101
+ if (isSingleSkill) {
98
102
  const res = await runScan(pythonCmd, scanScript, "scan", targetPath, {
99
103
  detailed,
100
104
  behavioral: useBehav,
package/src/cron.ts CHANGED
@@ -181,7 +181,7 @@ async function ensureCronJobViaCLI(logger: any): Promise<void> {
181
181
  `--cron "${CRON_SCHEDULE}"`,
182
182
  `--tz "${CRON_TIMEZONE}"`,
183
183
  "--session isolated",
184
- '--message "Please run /skills-scanner scan --report and send results to this channel"',
184
+ '--message "/skills-scanner scan --report"',
185
185
  "--announce",
186
186
  "--channel last",
187
187
  ].join(" ");
@@ -237,7 +237,7 @@ async function ensureCronJobViaCLI(logger: any): Promise<void> {
237
237
  logger.info(`[skills-scanner] --tz "${CRON_TIMEZONE}" \\`);
238
238
  logger.info("[skills-scanner] --session isolated \\");
239
239
  logger.info(
240
- '[skills-scanner] --message "Please run /skills-scanner scan --report and send results to this channel" \\'
240
+ '[skills-scanner] --message "/skills-scanner scan --report" \\'
241
241
  );
242
242
  logger.info("[skills-scanner] --announce \\");
243
243
  logger.info("[skills-scanner] --channel last");
@@ -271,7 +271,7 @@ export function checkCronJobStatus(logger: any): void {
271
271
  logger.info(`[skills-scanner] --tz "${CRON_TIMEZONE}" \\`);
272
272
  logger.info("[skills-scanner] --session isolated \\");
273
273
  logger.info(
274
- '[skills-scanner] --message "Please run /skills-scanner scan --report and send results to this channel" \\'
274
+ '[skills-scanner] --message "/skills-scanner scan --report" \\'
275
275
  );
276
276
  logger.info("[skills-scanner] --announce \\");
277
277
  logger.info("[skills-scanner] --channel last");