ClawdHub 技能安全守门人
简介
ClawdHub 官方安全扫描工具,用于检测技能中的恶意模式,但当前版本仅为文档描述,缺乏实际可执行代码。
原始描述
Scans OpenClaw skills for security vulnerabilities and suspicious patterns before installation
通过你的 Agent 添加
安装目录:security-skill-scanner/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Security Skill Scanner 是一个面向 ClawdHub 技能生态的安全检测工具,设计目标是为技能安装提供前置安全扫描。根据 SKILL.md 描述,它支持多种使用场景:批量扫描所有已安装技能、针对特定技能进行深度检查、管理白名单以排除误报、监控 Moltbook 社区的安全讨论,以及生成带有 Isnad 信任链的权限清单。用户可通过命令行调用 Python 脚本执行扫描,或配置定时任务实现自动化监控。最突出的特性是预安装钩子(Pre-Install Hook),可在 molthub install 时自动拦截可疑技能,通过 --force 参数允许高级用户覆盖警告。
显著优点
该技能的设计理念具有前瞻性:将安全左移至安装阶段,而非事后审计。Regex 模式覆盖凭证窃取、命令注入、网络外泄等常见攻击向量,白名单机制减少误报对用户体验的干扰,Moltbook 监控则尝试建立社区驱动的威胁情报网络。权限清单的 Isnad 链设计体现了对软件供应链溯源的思考,JSON/Markdown 双格式报告兼顾机器解析与人工阅读。预安装钩子的集成方案(通过 shell 函数包装 molthub)在架构上较为优雅,无需修改核心工具即可增强安全能力。
潜在缺点与局限性
致命缺陷:当前版本仅为"僵尸技能"——SKILL.md 详细描述了 skill-scanner.py、whitelist-manager.py、moltbook-monitor.sh 等核心文件的功能,但这些文件在目录中完全不存在。用户安装后将无法执行任何声称的功能,产生严重的期望落差。此外,纯基于正则的静态分析难以应对混淆代码、多态攻击等高级威胁;白名单的维护依赖人工判断,可能存在滞后性;Moltbook 监控的数据源质量和实时性未经验证;Isnad 链的信任锚定机制缺乏详细说明。
适合的目标群体
该技能理论上适合:ClawdHub 平台管理员、安全意识较强的终端用户、需要合规审计的企业环境。但由于功能缺失,当前版本不推荐任何用户安装。开发者若希望基于此框架实现真实功能,需补充完整的 Python 实现、测试用例、以及持续更新的威胁模式库。
使用风险
- 功能不可用风险:安装后无法运行,浪费用户时间与信任。
- 虚假安全感风险:用户可能误以为系统已受保护,降低对其他威胁的警惕。
- 供应链风险:若未来版本补充代码,需重新评估其实现质量,尤其是预安装钩子的权限边界(是否以 root 运行?能否被绕过?)。
- 维护风险:安全工具需要持续更新威胁情报,作者未承诺维护周期。
- 集成风险:shell 函数包装方案可能与其他 molthub 封装工具冲突。
技能正文
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")
原始仓库
作者的项目地址:https://github.com/sundial-org/awesome-openclaw-skills