security-hardener

Audit and harden OpenClaw configuration for security. Scans openclaw.json for vulnerabilities, exposed credentials, insecure gateway settings, overly permissive exec rules, and missing security best practices. Use when asked to audit security, harden configuration, check for vulnerabilities, or secure an OpenClaw deployment.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "security-hardener" with this command: npx skills add mariusfit/oc-security-hardener

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               ║
╚══════════════════════════════════════════════════╝

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

OpenClaw Hardener

Harden OpenClaw (workspace + ~/.openclaw): run openclaw security audit, catch prompt-injection/exfil risks, scan for secrets, and apply safe fixes (chmod/exec-bit cleanup). Includes optional config.patch planning to reduce attack surface.

Registry SourceRecently Updated
12.2K
Profile unavailable
Security

Baseline Kit

OpenClaw 安全配置基线生成器和审计工具。生成开发/团队/企业/隔离环境的安全配置模板,并审计现有配置的安全问题(网络暴露、认证限流、技能来源限制、审计日志、备份策略、密钥卫生)。

Registry SourceRecently Updated
0232
Profile unavailable
Security

DeepSafe Scan

Preflight security scanner for OpenClaw — scans deployment config, skills, memory/sessions for secrets, PII, prompt injection, and dangerous patterns. Runs 4...

Registry SourceRecently Updated
068
Profile unavailable