360 Secure SkillHub
360 安全技能中心

Skill Guard Pro

ClawGuard 对 ClawHub 技能或本地技能目录做静态代码分析:结合正则模式与 Python AST,检测网络外传、凭据访问、Shell 命令执行、文件删除、代码混淆和隐藏文件,按权重输出 0-100 风险评分、SAFE/CAUTION/DANGEROUS 等级及退出码,支持文本与 JSON 报告。

分类:安全
chloepark85
chloepark85
热度 37.64
最近更新 2026-05-11 17:29:48

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add chloepark85/skill-guard-pro
兼容性
通用兼容
联网要求
需要联网
数据出网
可选出网
Metadata
name
clawguard
description
Security scanner for ClawHub skills. Analyze before you install.
license
MIT
metadata
{"openclaw":{"emoji":"🛡️","requires":{"bins":["uv"]}}}

ClawGuard 🛡️

Scan ClawHub skills for security risks before installing.

ClawGuard performs static code analysis on ClawHub skills to detect:

  • 🌐 Network exfiltration (HTTP POST to external URLs)
  • 🔑 Credential access (API keys, tokens, passwords)
  • ⚡ Shell command execution
  • 💥 File destruction (rm -rf, unlink)
  • 🎭 Code obfuscation (eval, base64 decode)
  • 👻 Hidden files and directories

Usage

Scan by skill name

Download and scan a skill from ClawHub:

uv run {baseDir}/scripts/scan.py --skill <skill-name>

Scan local directory

Scan a skill directory on your local filesystem:

uv run {baseDir}/scripts/scan.py --path /path/to/skill

JSON output

Get results in JSON format:

uv run {baseDir}/scripts/scan.py --skill <skill-name> --json

Examples

Scan the GitHub skill:

uv run {baseDir}/scripts/scan.py --skill github

Scan a local skill:

uv run {baseDir}/scripts/scan.py --path ~/.openclaw/skills/my-skill

Risk Levels

  • 🟢 SAFE (0-30): No significant risks detected
  • 🟡 CAUTION (31-60): Review flagged items before installing
  • 🔴 DANGEROUS (61-100): High-risk patterns detected — DO NOT INSTALL

Exit Codes

  • 0: Safe
  • 1: Caution
  • 2: Dangerous

Requirements

  • Python 3.11+
  • uv (Python package manager)
  • clawhub CLI (optional, for downloading skills)

How It Works

  1. Pattern Matching: Regex-based detection of dangerous code patterns
  2. AST Analysis: Python AST parsing for eval/exec detection
  3. URL Extraction: Identifies all network endpoints
  4. Risk Scoring: Weighted severity scoring (0-100)

What It Detects

Category Weight Examples
Network exfiltration 25 POST to unknown URL with data
Credential access 20 Reading API keys, tokens
Shell execution 15 exec(), subprocess, system()
File destruction 15 rm -rf, unlink, rmdir
Obfuscation 15 eval(), atob(), Buffer.from
Hidden files 10 Dotfiles, hidden directories

Limitations

  • Static analysis only: Cannot detect runtime behavior
  • Regex-based: May have false positives/negatives
  • JS/TS: Basic pattern matching (no full AST parsing)
  • Encrypted/minified code: Cannot analyze obfuscated payloads

Best Practices

  1. Always scan before installing untrusted skills
  2. Review CAUTION-level findings manually
  3. Check network endpoints for unknown domains
  4. Never install DANGEROUS skills without verification
  5. Report suspicious skills to ClawHub moderators

License

MIT