Openclaw security hardening
Skill BagelHole/DevOps-Security-Agent-Skills/infrastructure/local-ai/openclaw-security-hardening
Agent-ready DevOps, security, infrastructure, and compliance knowledge base with 80+ skills across Kubernetes, Terraform, AWS/Azure/GCP, AI platform operations, container hardening, SOC2/ISO27001, and incident response—plus ready-to-run scripts, templates, and playbooks for SRE, platform, and security teams.
npx -y skills add BagelHole/DevOps-Security-Agent-Skills --skill openclaw-security-hardeningAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Harden OpenClaw self-hosted environments with baseline host controls, auth tightening, secret handling, network segmentation, and safe update/rollback workflows. Use when deploying OpenClaw in home labs, startups, or production-like local AI infrastructure.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.9 KB, 777 tokens by cl100k_base, as published. Nobody here has run it
OpenClaw Security Hardening
Use this skill to reduce exposure in self-hosted OpenClaw deployments before opening access to teammates or external networks.
Build a Threat Model First
Map the highest-risk assets and paths:
- Admin/API endpoints for OpenClaw
- Provider API keys and model credentials
- Prompt/response logs containing sensitive business data
- Host-level access (SSH, local admin accounts, remote desktop)
Prioritize controls that reduce credential theft, remote code execution blast radius, and data exfiltration.
Apply Baseline Host Hardening
- Keep OS and package dependencies patched on a regular cadence.
- Run OpenClaw as a dedicated non-admin user account.
- Enable full-disk encryption and secure boot features where available.
- Remove unnecessary services and block inbound ports by default.
- Lock down remote admin (key-only SSH, no password login, limited source CIDRs).
Example Linux baseline checks:
id openclaw
sudo ss -tulpn
sudo ufw status verbose
sudo systemctl --failed
Harden Application Runtime
- Bind OpenClaw to localhost or private VLAN by default.
- Place a reverse proxy in front of OpenClaw for TLS, auth, and rate limits.
- Enforce authentication on every non-health endpoint.
- Disable debug/dev modes in persistent environments.
- Restrict outbound egress to only required providers (LLM API, telemetry sink, package mirror).
Example reverse proxy controls to enforce:
- TLS 1.2+ only
- strict transport security header
- request body size limits
- request timeout and upstream timeout guardrails
- per-IP and per-token rate limiting
Protect Secrets and Tokens
- Store secrets in a vault or platform secret manager, not committed
.envfiles. - Rotate provider and admin tokens on a fixed interval and after any incident.
- Scope tokens minimally (least privilege, per-service keys).
- Scan repos and deployment artifacts for leaked credentials before release.
Rotation checklist:
- Generate replacement key.
- Update runtime secret store.
- Restart or reload OpenClaw.
- Validate request success with new key.
- Revoke old key.
Segment Network Access
Use layered access patterns:
- Tier 1 (private): OpenClaw service port reachable only from app/proxy subnet.
- Tier 2 (operator): Admin plane reachable only from VPN/Tailscale/WireGuard.
- Tier 3 (public): Expose only hardened reverse proxy with strict ACLs.
Do not publish raw OpenClaw service ports directly to the internet.
Add Detection and Recovery Paths
- Centralize auth, error, and audit logs.
- Alert on brute-force attempts, token failures, and unusual outbound traffic.
- Capture immutable backup snapshots of configs and prompt data retention settings.
- Test rollback and restore procedures every release cycle.
Minimum operational runbook:
- service restart path
- key revocation path
- incident isolation path (network block + token disable)
- known-good rollback version
Validation Checklist
- All sensitive endpoints require auth and are unreachable without VPN or gateway policy.
- Secrets are absent from repo history and plaintext shared directories.
- Host firewall default deny is active for inbound traffic.
- TLS termination and rate limits are active at ingress.
- Rollback drill can restore service within target RTO.
Related Skills
- openclaw-local-mac-mini - Local OpenClaw hosting setup
- multi-tenant-llm-hosting - Multi-tenant AI isolation patterns
- zero-trust - Private access and identity-aware network controls
Gives 0 of the 12 instructions most security skills give in 777 tokens
Counted across 648 of the 828 authors here whose files we hold, read 2026-08-06
- parameterize all database queriesin 67 of 648, across 49 files
- hash passwords using bcrypt scrypt or argon2in 48 of 648, across 35 files
- apply rate limiting to authentication endpointsin 48 of 648, across 24 files
- Configure security headersin 35 of 648, across 18 files
- validate all inputsin 32 of 648, across 24 files
- validate all external input at the system boundaryin 29 of 648, across 18 files
- run containers as a non-root userin 28 of 648, across 15 files
- use httponly secure samesite cookies for sessionsin 26 of 648, across 15 files
- run dependency audits before every releasein 21 of 648, across 10 files
- encode output to prevent cross-site scriptingin 21 of 648, across 10 files
- copy dependencies before source codein 20 of 648, across 9 files
- store secrets in environment variablesin 20 of 648, across 17 files
Said here and by no other author read
- map high-risk assets and attack paths
- patch os and dependencies regularly
- enable disk encryption and secure boot
- block inbound ports by default
- enforce authentication on non-health endpoints
- store secrets in a vault not env files
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.