← 返回
安全合规 中文

skill-security-scanner-clean

Security scanner for OpenClaw skills. Use when installing, updating, or auditing skills to detect malicious backdoors, suspicious code patterns, data exfiltr...
OpenClaw技能安全扫描器。用于安装、更新或审计技能时检测恶意后门、可疑代码模式及数据窃取。
cookiemikeliu
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 678
下载
💾 8
安装
1
版本
#latest

概述

Skill Security Scanner

Protect your OpenClaw installation from malicious skills. This scanner performs static analysis on skill code to detect:

  • Code Execution Threats: eval, exec, os.system, subprocess calls
  • Data Exfiltration: Hidden network requests, suspicious URLs, IP connections
  • System Compromise: File deletion, permission changes, privilege escalation
  • Credential Theft: Environment variable access, secret harvesting
  • Cryptojacking: Mining malware, suspicious compute patterns
  • Obfuscation: Hidden code, base64 encoding, minification
  • Spyware: Keyloggers, screen capture, surveillance features

Quick Start

# Basic scan
python scripts/security_scanner.py /path/to/skill

# Strict mode (catches more suspicious patterns)
python scripts/security_scanner.py /path/to/skill --strict

# Save JSON report
python scripts/security_scanner.py /path/to/skill --format json -o report.json

# Generate markdown report
python scripts/security_scanner.py /path/to/skill --format markdown -o report.md

Understanding Results

Verdict Levels

VerdictEmojiMeaningAction
---------------------------------
PASS🟢No critical issues foundSafe to install
REVIEW🟡Some concerns, review recommendedCheck findings before installing
WARNING🟠High-risk patterns detectedStrongly reconsider installation
REJECT🔴Critical threats identifiedDO NOT INSTALL

Security Score

  • 90-100: Excellent - minimal risk
  • 70-89: Good - minor issues
  • 50-69: Fair - requires review
  • 0-49: Poor - significant risks

Detection Rules

Critical (🔴)

RuleDescriptionExample
----------------------------
EXEC001Code execution functionseval(), exec(), compile()
SUSPICIOUS001Keylogger functionalitypynput, keyboard modules
SUSPICIOUS003Cryptocurrency miningmining, bitcoin, stratum+tcp

High (🟠)

RuleDescriptionExample
----------------------------
EXEC002System command executionos.system(), subprocess.call()
NET002Raw socket connectionssocket.connect()
ENV001Sensitive credential accessos.environ['PASSWORD']
OBF001Code obfuscationBase64, hex-encoded code
SUSPICIOUS002Screen capturepyautogui.screenshot()
NET004Short URL usagebit.ly, tinyurl links

Medium (🟡)

RuleDescriptionExample
----------------------------
NET001HTTP network requestsrequests.get(), fetch()
ENV002Environment enumerationos.environ.items()
FILE001File deletionos.remove(), shutil.rmtree()
DATA001Unsafe deserializationpickle.loads(), yaml.load()
NET003Hardcoded IP addressesDirect IP in URLs
OBF002Base64 encoded blocksLarge base64 strings

Low/Info (🔵/⚪)

RuleDescription
-------------------
FILE002File write operations
CRYPTO001Cryptographic operations
DOC001Insufficient documentation
DOC002Missing security statements

Workflow

Before Installing a New Skill

  1. Download the skill to a temporary directory
  2. Run the security scanner
  3. Review the verdict:
    • 🟢 PASS: Proceed with installation
    • 🟡 REVIEW: Examine findings, verify legitimate use
    • 🟠 WARNING: Only install from trusted sources
    • 🔴 REJECT: Do not install
  1. For 🟡/🟠 findings, manually review the flagged code
  2. Confirm the skill's behavior matches its documentation

Before Updating an Existing Skill

  1. Run scanner on the new version
  2. Compare results with previous version's scan
  3. Check for new critical/high findings
  4. Review any new network/file operations

Automated Integration

Add to your skill installation workflow:

import subprocess
import sys

def safe_install_skill(skill_path):
    # Run security scan
    result = subprocess.run(
        ['python', 'scripts/security_scanner.py', skill_path, '--format', 'json'],
        capture_output=True,
        text=True
    )
    
    import json
    report = json.loads(result.stdout)
    
    if report['summary']['verdict'] == 'REJECT':
        print("❌ Installation blocked: Critical security issues found")
        return False
    
    if report['summary']['verdict'] == 'WARNING':
        response = input("⚠️ High-risk patterns detected. Install anyway? (y/N): ")
        if response.lower() != 'y':
            return False
    
    # Proceed with installation
    return True

Handling False Positives

Some legitimate skills may trigger warnings:

  • Network requests: Skills that fetch data from APIs
  • File operations: Skills that modify documents
  • Encryption: Skills handling sensitive data

When you trust the source and understand the functionality, you can:

  1. Review the specific code flagged
  2. Verify it matches the documented purpose
  3. Manually approve if confident

Reporting Issues

If you find a skill with confirmed malicious intent:

  1. Do not install or run it
  2. Report to the skill repository/hosting platform
  3. Notify OpenClaw community channels
  4. Share scan report (without executing the skill)

Best Practices

  1. Only install skills from trusted sources
  2. Always scan before installing - even from trusted sources
  3. Review findings carefully - understand what the skill does
  4. Keep scanner updated - new detection rules added regularly
  5. Use strict mode for untrusted sources - catches more suspicious patterns
  6. Check skill updates - re-scan when updating existing skills

Exit Codes

The scanner returns specific exit codes:

CodeMeaning
---------------
0PASS or REVIEW - installation may proceed
1WARNING - high-risk patterns found
2REJECT - critical threats detected

Use in scripts:

python scripts/security_scanner.py ./skill || {
    echo "Security check failed"
    exit 1
}

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 04:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

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

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,212 📥 266,313
security-compliance

1password

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