Security scanner that analyzes skill code before installation.
| Check | Pattern | Action | |
|---|---|---|---|
| ------- | --------- | -------- | |
| Disk wipe | rm -rf /, rm -rf ~, dd if=.*of=/dev/sdX | BLOCK | |
| Fork bomb | `:(){ :\ | :& };:, fork()` loop | BLOCK |
| Format | mkfs, newfs, umount -f | BLOCK | |
| SSH key deletion | rm.\.ssh/, ssh-keygen.-D | BLOCK | |
| System takeover | chmod 777.*shadow, /etc/passwd edit | BLOCK |
| Check | Pattern | Action | |
|---|---|---|---|
| ------- | --------- | -------- | |
| Dangerous rm | rm -rf [a-z]+\ (recursive without targets) | WARN | |
| Network exfil | base64 remote exfil, `curl.*\ | .*sh` | WARN |
| Credential access | .env, ~/.aws/, API key patterns | WARN | |
| Suspicious encoding | Obfuscated JavaScript, encoded commands | WARN | |
| High-privilege | sudo, chmod 777, setfacl | WARN | |
| Unknown network | Non-standard ports, suspicious domains | WARN |
| Check | Pattern |
|---|---|
| ------- | --------- |
| File write | Writes outside skill directory |
| Permission change | Any chmod |
| New file creation | File creation in system paths |
When OpenClaw hooks are configured, the vetter runs automatically:
# Configure in OpenClaw settings
skill_vetter:
enabled: true
auto_block: true # Block critical issues
warn_only: false # false = block criticals
python3 ~/.openclaw/skills/skill-vetter/scripts/vetter.py \
scan ~/.openclaw/skills/my-skill
╔══════════════════════════════════════════════════╗
║ 🛡️ Skill Security Vetting Report ║
╠══════════════════════════════════════════════════╣
║ Skill: my-skill ║
║ Scan Time: 2026-04-06 07:21:00 ║
║ ║
║ 🔴 CRITICAL: 0 🟡 WARNING: 2 🔵 INFO: 1 ║
╠══════════════════════════════════════════════════╣
║ Findings: ║
║ (see actual scan output for details) ║
╠══════════════════════════════════════════════════╣
║ Verdict: ⚠️ INSTALL WITH CAUTION ║
╚══════════════════════════════════════════════════╝
For automatic pre-install vetting, this skill should be invoked by the OpenClaw skill installation hook. The hook configuration:
# In OpenClaw config
hooks:
pre_skill_install:
- name: skill-vetter
action: scan_then_block
block_on_critical: true
| Severity | Count | Verdict |
|---|---|---|
| ---------- | ------- | --------- |
| 🔴 Critical | > 0 | 🚫 BLOCK INSTALL |
| 🟡 Warning | > 3 | ⚠️ WARN + CONFIRM |
| 🟡 Warning | ≤ 3 | ✅ INSTALL WITH CAUTION |
| Only 🔵 Info | Any | ✅ CLEAR TO INSTALL |
The scanner is in scripts/vetter.py. Key functions:
scan_skill(skill_path) - Main entry pointcheck_dangerous_commands(content) - Bash pattern matchingcheck_sensitive_access(content) - File/credential patternscheck_network_activity(content) - Exfil indicatorscheck_obfuscation(content) - Obfuscated code detectiongenerate_report(findings) - Formatted output共 1 个版本