← 返回
安全合规 中文

skills-firewall

Security firewall for skills that automatically blocks and filters malicious or potentially harmful skills. Use when: (1) Scanning skills for security threat...
技能安全防火墙,自动拦截并过滤恶意或潜在有害技能。适用场景:(1)扫描技能以排查安全威胁...
huzibbs
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 592
下载
💾 7
安装
1
版本
#latest

概述

Skills Firewall

A security firewall that automatically blocks and filters malicious or potentially harmful skills by analyzing code patterns, detecting security threats, and enforcing security policies.

Quick Start

Scan a Single Skill

python scripts/scan_skill.py /path/to/skill

Check Firewall Decision

python scripts/firewall_check.py /path/to/skill

Generate Security Report

python scripts/generate_report.py /path/to/skills --format text

Core Workflows

1. Security Scanning

Scan skills for potential security threats:

# Scan single skill
python scripts/scan_skill.py ./my-skill

# Scan all skills in directory
python scripts/scan_skill.py ./skills

# JSON output for automation
python scripts/scan_skill.py ./my-skill --json

Threat Levels:

  • SAFE - No security concerns
  • LOW - Minor concerns, generally safe
  • MEDIUM - Moderate concerns, review recommended
  • HIGH - Significant risks, blocking recommended
  • CRITICAL - Severe threats, must block

2. Firewall Filtering

Check and filter skills based on security rules:

# Check single skill
python scripts/firewall_check.py ./my-skill

# Filter all skills
python scripts/firewall_check.py ./skills

# Add to allowed list
python scripts/firewall_check.py ./my-skill --allow

# Add to blocked list
python scripts/firewall_check.py ./my-skill --block

Actions:

  • allow - Skill passes firewall
  • warn - Skill has warnings but allowed
  • block - Skill is blocked
  • quarantine - Skill isolated for review

3. Security Reports

Generate comprehensive security reports:

# Text report
python scripts/generate_report.py ./skills

# JSON report
python scripts/generate_report.py ./skills --format json

# HTML report
python scripts/generate_report.py ./skills --format html --output report.html

Detection Categories

The firewall detects threats in these categories:

CategoryExamplesSeverity
------------------------------
Code Injectioneval(), exec(), __import__()HIGH
Command Executionsubprocess shell=True, os.system()HIGH
Credential ExposureHardcoded passwords, API keysCRITICAL
Network CommunicationHTTP requests, socket connectionsMEDIUM
File OperationsFile deletion, modificationMEDIUM
Deserializationpickle.loads, unsafe yaml.loadHIGH
Privilege Escalationsudo, chmod 777HIGH
ObfuscationBase64 decoding, encodingLOW

Configuration

Export/Import Config

# Export current config
python scripts/firewall_check.py ./skills --export-config firewall.yaml

# Use custom config
python scripts/firewall_check.py ./skills --config firewall.yaml

Config File Format

default_action: warn
allowed_skills:
  - skill-creator
  - weather
blocked_skills:
  - malicious-skill
quarantine_dir: ./quarantine
rules:
  - name: block_eval
    description: Block eval() usage
    patterns:
      - "eval("
    action: block
    enabled: true

Reference Documentation

Programmatic Usage

from scan_skill import scan_skill, ThreatLevel
from firewall_check import SkillsFirewall, ActionType

# Scan a skill
result = scan_skill("/path/to/skill")
print(f"Threat Level: {result.threat_level}")
print(f"Is Safe: {result.is_safe}")

# Use firewall
firewall = SkillsFirewall()
decision = firewall.check_skill("/path/to/skill")
print(f"Action: {decision.action}")
print(f"Reason: {decision.reason}")

# Manage lists
firewall.add_allowed_skill("trusted-skill")
firewall.add_blocked_skill("malicious-skill")

# Create custom rule
firewall.create_rule(
    name="block_custom_pattern",
    description="Block custom dangerous pattern",
    patterns=["dangerous_function("],
    action=ActionType.BLOCK
)

Best Practices

  1. Scan Before Use: Always scan new skills before installation
  2. Review Warnings: Investigate warning-level findings
  3. Update Rules: Keep detection patterns current
  4. Document Exceptions: Record why skills are allowed/blocked
  5. Regular Audits: Run periodic security scans
  6. Use Reports: Generate reports for compliance and review

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 07:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

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

OpenClaw Backup

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

1password

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