← 返回
安全合规 中文

Security Hardener

Audit and harden OpenClaw configuration for security. Scans openclaw.json for vulnerabilities, exposed credentials, insecure gateway settings, overly permiss...
审计并加固 OpenClaw 配置的安全性。扫描 openclaw.json 以查找漏洞、暴露的凭据、不安全的网关设置以及过度权限...
mariusfit
安全合规 clawhub v1.0.0 1 版本 99959.4 Key: 无需
★ 1
Stars
📥 2,443
下载
💾 17
安装
1
版本
#audit#hardening#latest#openclaw#security

概述

Security Hardener

Audit your OpenClaw configuration and apply security best practices automatically.

Quick Start

# Full security audit (read-only, no changes)
python scripts/hardener.py audit

# Audit a specific config file
python scripts/hardener.py audit --config /path/to/openclaw.json

# Audit with JSON output
python scripts/hardener.py audit -f json

# Auto-fix issues (creates backup first)
python scripts/hardener.py fix

# Fix specific issues only
python scripts/hardener.py fix --only gateway,permissions

# Scan for exposed credentials in config
python scripts/hardener.py scan-secrets

# Generate a security report
python scripts/hardener.py report -o security-report.md

# Check file permissions
python scripts/hardener.py check-perms

Commands

CommandArgsDescription
----------------------------
audit[--config PATH] [-f FORMAT]Full security audit (read-only)
fix[--config PATH] [--only CHECKS]Auto-fix issues (with backup)
scan-secrets[--config PATH]Scan for exposed API keys/tokens
report[-o FILE]Generate detailed security report
check-perms[--config-dir PATH]Check file permissions

Security Checks

CheckSeverityDescription
------------------------------
gateway-bindCRITICALGateway not bound to loopback
exposed-keysCRITICALAPI keys in config instead of .env
insecure-authHIGHallowInsecureAuth or dangerouslyDisableDeviceAuth enabled
exec-sandboxHIGHexec sandbox mode not set to restricted
file-permsHIGHConfig files readable by others (not 600)
agent-allow-allMEDIUMagentToAgent.allow: ["*"] is overly permissive
no-heartbeatMEDIUMNo heartbeat configured (can't detect outages)
no-session-resetMEDIUMNo session reset policy (memory leak risk)
no-pruningLOWNo context pruning (cost and performance impact)
no-memory-flushLOWMemory flush disabled (context loss on pruning)

Scoring

The audit produces a security score from 0-100:

  • 90-100: Excellent — production-ready
  • 70-89: Good — minor improvements recommended
  • 50-69: Fair — several issues to address
  • 0-49: Poor — critical issues require immediate attention

Example Output

╔══════════════════════════════════════════════════╗
║  OPENCLAW SECURITY AUDIT                         ║
╠══════════════════════════════════════════════════╣
║  Score: 75/100 (Good)                            ║
║                                                  ║
║  ✅ Gateway bound to loopback                    ║
║  ✅ No exposed API keys in config                ║
║  ⚠️  exec sandbox mode: unrestricted             ║
║  ⚠️  agentToAgent allow: * (too permissive)      ║
║  ❌ File permissions too open (644 → should be 600) ║
║  ✅ Heartbeat configured                         ║
║  ✅ Session reset policy active                   ║
║  ⚠️  No context pruning configured               ║
╚══════════════════════════════════════════════════╝

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 10:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Smart Web Scraper

mariusfit
从任意网页提取结构化数据。支持 CSS 选择器,自动识别表格和列表,输出 JSON/CSV 格式。适用于在需要抓取网页时使用...
★ 0 📥 2,947
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,694
security-compliance

Skill Vetter

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