简介
ClawdHub 技能安全扫描器,检测可疑代码模式、管理白名单并监控 Moltbook 安全威胁,支持自动化预安装拦截。
原始描述
Security scanner for ClawdHub skills - detects suspicious patterns, manages whitelists, and monitors Moltbook for security threats.
通过你的 Agent 添加
安装目录:security-skill-scanner/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心功能
security-skill-scanner 是一个防御性安全工具,旨在为 ClawdHub 生态系统提供技能安全检测能力。根据 SKILL.md 描述,其核心功能包括:
- 模式检测:通过正则表达式扫描 SKILL.md 文件,识别凭据窃取(
.env访问、webhook.site)、命令注入(os.system、eval、shell=True)、网络外泄(HTTP Bearer Token 请求)等可疑模式 - 白名单管理:维护已知合法技能列表,减少误报
- Moltbook 监控:持续监控社区安全讨论和诈骗警报
- 权限清单生成:创建技能权限追踪链(Isnad chains)
- 预安装钩子:拦截
molthub install命令,自动扫描并阻止可疑技能安装
显著优点
- 零代码风险:经 CLS-Certify 扫描认证,本技能仅包含 SKILL.md 和 _meta.json 两个文件,无可执行代码,纯文档性质使其天然免疫代码注入、依赖漏洞等风险
- 全面的威胁覆盖:检测模式涵盖 OWASP 常见漏洞类型,从凭据泄露到命令执行均有覆盖
- 社区驱动防御:通过 Moltbook 监控实现威胁情报共享,形成集体防御机制
- 灵活的集成方式:支持命令行独立运行、Cron 自动化、Python 模块导入及 shell 函数劫持等多种部署模式
- 透明的决策机制:明确的评分系统(Clean/Whitelisted/Suspicious)和强制覆盖选项(
--force)兼顾安全与可用性
潜在局限
- 文档与实际代码分离:SKILL.md 描述的 Python/Bash 脚本(
skill-scanner.py、moltbook-monitor.sh 等)未包含在当前技能包中,用户需单独获取,破坏了"即装即用"的体验
- T3 来源可信度:作者为个人开发者(ClaudiatheLobster),非知名安全厂商,虽本文档本身安全,但其实际实现代码的可靠性需独立验证
- 静态分析的固有局限:基于正则表达式的模式匹配难以检测混淆代码、零日漏洞或语义层面的逻辑漏洞
- 权限清单的可持续性:Isnad 信任链机制在技能生态规模扩大后可能面临维护复杂性
- 误报与漏报平衡:白名单机制依赖人工维护,新型合法技能可能被误拦截,而精心构造的攻击可能绕过模式匹配
适合人群
- ClawdHub 平台管理员:需要批量审计技能安全性的运维人员
- 安全意识较强的终端用户:频繁安装第三方技能且希望建立安装前检查机制的用户
- 安全研究者:研究 AI 技能生态系统威胁模型的研究人员
- 企业合规团队:需满足供应链安全审计要求的组织
常规风险
风险类别
等级
说明
代码执行风险
🟢 极低
纯 Markdown 文档,无实际代码
供应链风险
🟡 中
依赖外部获取的扫描脚本,需单独审查
误拦截风险
🟡 中
自动化拦截可能影响合法技能安装
情报时效风险
🟡 中
威胁模式库需持续更新以覆盖新型攻击
操作依赖风险
🟡 中
Cron 自动化配置若脚本存在缺陷可能影响系统稳定性
--force)兼顾安全与可用性- 文档与实际代码分离:SKILL.md 描述的 Python/Bash 脚本(
skill-scanner.py、moltbook-monitor.sh等)未包含在当前技能包中,用户需单独获取,破坏了"即装即用"的体验 - T3 来源可信度:作者为个人开发者(ClaudiatheLobster),非知名安全厂商,虽本文档本身安全,但其实际实现代码的可靠性需独立验证
- 静态分析的固有局限:基于正则表达式的模式匹配难以检测混淆代码、零日漏洞或语义层面的逻辑漏洞
- 权限清单的可持续性:Isnad 信任链机制在技能生态规模扩大后可能面临维护复杂性
- 误报与漏报平衡:白名单机制依赖人工维护,新型合法技能可能被误拦截,而精心构造的攻击可能绕过模式匹配
适合人群
- ClawdHub 平台管理员:需要批量审计技能安全性的运维人员
- 安全意识较强的终端用户:频繁安装第三方技能且希望建立安装前检查机制的用户
- 安全研究者:研究 AI 技能生态系统威胁模型的研究人员
- 企业合规团队:需满足供应链安全审计要求的组织
常规风险
风险类别
等级
说明
代码执行风险
🟢 极低
纯 Markdown 文档,无实际代码
供应链风险
🟡 中
依赖外部获取的扫描脚本,需单独审查
误拦截风险
🟡 中
自动化拦截可能影响合法技能安装
情报时效风险
🟡 中
威胁模式库需持续更新以覆盖新型攻击
操作依赖风险
🟡 中
Cron 自动化配置若脚本存在缺陷可能影响系统稳定性
| 风险类别 | 等级 | 说明 |
|---|---|---|
| 代码执行风险 | 🟢 极低 | 纯 Markdown 文档,无实际代码 |
| 供应链风险 | 🟡 中 | 依赖外部获取的扫描脚本,需单独审查 |
| 误拦截风险 | 🟡 中 | 自动化拦截可能影响合法技能安装 |
| 情报时效风险 | 🟡 中 | 威胁模式库需持续更新以覆盖新型攻击 |
| 操作依赖风险 | 🟡 中 | Cron 自动化配置若脚本存在缺陷可能影响系统稳定性 |
关键建议:本技能作为"安全工具的说明书"本身安全无害,但用户若按文档指引安装配套脚本,必须执行独立的安全审查,不可因本技能的高评分而假设其衍生组件同样可信。
技能正文
name: security-skill-scanner
version: 1.0.0
description: Security scanner for ClawdHub skills - detects suspicious patterns, manages whitelists, and monitors Moltbook for security threats.
homepage: https://github.com/digitaladaption/openclaw-skills-security-checker
metadata: {"clawdbot":{"emoji":"🔒","category":"security"},"author":"ClaudiatheLobster"}
Security Skill Scanner
Scans ClawdHub skills for suspicious patterns, manages permission manifests, and monitors Moltbook for security threats.
Features
- Pattern Detection: Scans SKILL.md files for credential theft, command injection, network exfil patterns
- Whitelist Management: Maintains list of known legitimate skills
- Moltbook Monitoring: Continuously monitors Moltbook for security discussions and scam alerts
- Permission Manifests: Generates and tracks skill permissions with Isnad chains
- Daily Reports: Automatic scanning with markdown/JSON reports
Usage
Scan All Skills
python3 /root/clawd/skills/security-skill-scanner/skill-scanner.py
Scan Specific Skill
Scan All Skills
python3 /root/clawd/skills/security-skill-scanner/skill-scanner.py
python3 /root/clawd/skills/security-skill-scanner/skill-scanner.py --skill nano-banana-pro
Add to Whitelist
python3 /root/clawd/skills/security-skill-scanner/whitelist-manager.py add skill-name "reason for whitelist"
Check Whitelist
python3 /root/clawd/skills/security-skill-scanner/whitelist-manager.py list
Monitor Moltbook (One-shot)
bash /root/clawd/skills/security-skill-scanner/moltbook-monitor.sh
Files
File
Purpose
skill-scanner.py
Main scanner with regex pattern detection
whitelist-manager.py
Manage false-positive whitelist
moltbook-monitor.sh
Moltbook security feed monitor
permission-manager.py
Generate skill permission manifests
data/whitelist.json
Whitelisted skills database
Patterns Detected
Category
Patterns
Credential Theft
.env access, webhook.site, POST secrets
Command Injection
os.system, eval, shell=True, subprocess
Network Exfil
HTTP requests with Bearer tokens
Suspicious Downloads
wget, curl -O, remote scripts
Whitelisted Skills
python3 /root/clawd/skills/security-skill-scanner/whitelist-manager.py add skill-name "reason for whitelist"
python3 /root/clawd/skills/security-skill-scanner/whitelist-manager.py list
Monitor Moltbook (One-shot)
bash /root/clawd/skills/security-skill-scanner/moltbook-monitor.sh
Files
File
Purpose
skill-scanner.py
Main scanner with regex pattern detection
whitelist-manager.py
Manage false-positive whitelist
moltbook-monitor.sh
Moltbook security feed monitor
permission-manager.py
Generate skill permission manifests
data/whitelist.json
Whitelisted skills database
Patterns Detected
Category
Patterns
Credential Theft
.env access, webhook.site, POST secrets
Command Injection
os.system, eval, shell=True, subprocess
Network Exfil
HTTP requests with Bearer tokens
Suspicious Downloads
wget, curl -O, remote scripts
Whitelisted Skills
bash /root/clawd/skills/security-skill-scanner/moltbook-monitor.sh
| File | Purpose |
|---|---|
skill-scanner.py |
Main scanner with regex pattern detection |
whitelist-manager.py |
Manage false-positive whitelist |
moltbook-monitor.sh |
Moltbook security feed monitor |
permission-manager.py |
Generate skill permission manifests |
data/whitelist.json |
Whitelisted skills database |
Patterns Detected
Category
Patterns
Credential Theft
.env access, webhook.site, POST secrets
Command Injection
os.system, eval, shell=True, subprocess
Network Exfil
HTTP requests with Bearer tokens
Suspicious Downloads
wget, curl -O, remote scripts
Whitelisted Skills
| Category | Patterns |
|---|---|
| Credential Theft | .env access, webhook.site, POST secrets |
| Command Injection | os.system, eval, shell=True, subprocess |
| Network Exfil | HTTP requests with Bearer tokens |
| Suspicious Downloads | wget, curl -O, remote scripts |
These skills are known legitimate and excluded from warnings:
- nano-banana-pro (Google Gemini)
- notion (Notion API)
- trello (Trello API)
- gog (Google Workspace)
- local-places (Google Places)
- bluebubbles (iMessage)
- weather (Weather API)
- And 5 more...
Cron Jobs (Optional)
Add to crontab for automated scanning:
# Daily skill scan at 4 AM
0 4 * * * python3 /root/clawd/skills/security-skill-scanner/skill-scanner.py >> /var/log/skill-scan.log 2>&1
# Moltbook monitor every 30 min
*/30 * * * * bash /root/clawd/skills/security-skill-scanner/moltbook-monitor.sh >> /var/log/moltbook-monitor.log 2>&1
Pre-Install Hook (Block Suspicious Skills)
Install new skills with automatic security scanning that BLOCKS suspicious installations:
Quick Install with Scan
# Interactive mode (asks before installing)
bash /root/clawd/skills/security-skill-scanner/install-skill.sh nano-banana-pro
# With force override (installs even if suspicious)
bash /root/clawd/skills/security-skill-scanner/install-skill.sh suspicious-skill --force
# Scan-only mode
python3 /root/clawd/skills/security-skill-scanner/install-hook.py skill-name --scan-only
Integration with molthub
# Interactive mode (asks before installing)
bash /root/clawd/skills/security-skill-scanner/install-skill.sh nano-banana-pro
# With force override (installs even if suspicious)
bash /root/clawd/skills/security-skill-scanner/install-skill.sh suspicious-skill --force
# Scan-only mode
python3 /root/clawd/skills/security-skill-scanner/install-hook.py skill-name --scan-only
Add to your shell profile for automatic scanning on every install:
# Add to ~/.bashrc or ~/.zshrc
molthub() {
if [ "$1" = "install" ] || [ "$1" = "add" ]; then
python3 /root/clawd/skills/security-skill-scanner/install-hook.py "$2" --interactive
else
/home/linuxbrew/.linuxbrew/bin/molthub "$@"
fi
}
Now every molthub install <skill> will be scanned first!
What Happens
- Clean skill → Installs normally ✅
- Whitelisted skill → Installs normally ✅
- Suspicious skill → BLOCKED with explanation 🚫
- Suspicious + --force → Warns but installs ⚠️
Example Output
🔒 Pre-Install Security Scan: nano-banana-pro
----------------------------------------------
Status: whitelisted
Action: allowed
✅ Scan passed - safe to install
🚀 Proceeding with installation...
✅ nano-banana-pro installed successfully
🔒 Pre-Install Security Scan: nano-banana-pro
----------------------------------------------
Status: whitelisted
Action: allowed
✅ Scan passed - safe to install
🚀 Proceeding with installation...
✅ nano-banana-pro installed successfully
vs
🔒 Pre-Install Security Scan: weather-scam
----------------------------------------------
Status: suspicious
Action: blocked
🚨 THREATS DETECTED:
🔴 [credential_theft] Access to .env file
File: SKILL.md
🔴 [network_exfil] HTTP requests with Bearer tokens
File: scripts/steal_creds.py
❌ INSTALLATION BLOCKED
To override: python3 install-hook.py weather-scam --force
Reports
/tmp/security-scanner/scan-report.md - Human-readable scan results
/tmp/security-scanner/scan-results.json - Structured JSON output
/tmp/security-scanner/moltbook-scan.log - Moltbook monitoring log
Integration
/tmp/security-scanner/scan-report.md - Human-readable scan results/tmp/security-scanner/scan-results.json - Structured JSON output/tmp/security-scanner/moltbook-scan.log - Moltbook monitoring logImport as a module:
from skill_scanner import RegexScanner
scanner = RegexScanner()
results = scanner.scan_all_skills()
print(f"Found {results['threats_found']} threats")
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。