π¦ ClawHub
OpenClaw Hardener
by @virtaava
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.
TERMINAL
clawhub install openclaw-hardenerπ About This Skill
name: openclaw-hardener description: "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."
OpenClaw Hardener
This skill provides a user-choice hardening tool that can:
openclaw security audit --deep / --fix)..env, unsafe serialization patterns, etc.).config.patch plan to tighten runtime policy.Run the tool
Script:
skills_live/openclaw-hardener/scripts/hardener.pyExamples:
# Read-only checks (recommended default)
python3 skills_live/openclaw-hardener/scripts/hardener.py check --allOnly run OpenClaw built-in audit (deep)
python3 skills_live/openclaw-hardener/scripts/hardener.py check --openclawOnly run workspace checks
python3 skills_live/openclaw-hardener/scripts/hardener.py check --workspaceApply safe fixes (chmod/exec-bit cleanup + optionally openclaw audit --fix)
python3 skills_live/openclaw-hardener/scripts/hardener.py fix --allGenerate a config.patch plan (prints JSON5 patch)
python3 skills_live/openclaw-hardener/scripts/hardener.py plan-configApply the plan (requires a running gateway; uses openclaw gateway call)
python3 skills_live/openclaw-hardener/scripts/hardener.py apply-config
Design rules (do not violate)
fix or apply-config.What it checks / fixes
OpenClaw built-in security audit
openclaw security audit --deep (and --fix in fix mode).Workspace hygiene (scope: workspace + ~/.openclaw)
~/.openclaw (basic checks)..env files (warn) and tracked .env (fail).Config hardening (optional plan)
Generates a conservativeconfig.patch template focusing on:
(Exact keys depend on your config; the plan is best-effort and should be reviewed.)