openclaw-security-hardening – skill Bảo mật cho agent AI
Gia cố bảo mật môi trường OpenClaw tự host với kiểm soát host cơ bản, siết xác thực, xử lý secret, phân đoạn mạng và quy trình cập nhật/rollback an toàn.
Cài skill openclaw-security-hardening bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/openclaw-security-hardening-aedcd.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /openclaw-security-hardening – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/openclaw-security-hardening-aedcd.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $openclaw-security-hardening – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/openclaw-security-hardening-aedcd.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /openclaw-security-hardening – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/openclaw-security-hardening-aedcd.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /openclaw-security-hardening – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
When to Use
- Provisioning, hardening, or operating the infrastructure described in this skill within an authorized environment.
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
1. Keep OS and package dependencies patched on a regular cadence.
2. Run OpenClaw as a dedicated non-admin user account.
3. Enable full-disk encryption and secure boot features where available.
4. Remove unnecessary services and block inbound ports by default.
5. 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 --failedHarden 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:
1. Generate replacement key.
2. Update runtime secret store.
3. Restart or reload OpenClaw.
4. Validate request success with new key.
5. 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 (
openclaw-local-mac-mini) - Local OpenClaw hosting setup - multi-tenant-llm-hosting (
multi-tenant-llm-hosting) - Multi-tenant AI isolation patterns - zero-trust (
zero-trust) - Private access and identity-aware network controls
When to Use
- You are provisioning, configuring, or troubleshooting the infrastructure component covered by this skill (servers, storage, databases, networking, cloud, local AI).
Limitations
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
- Docs-only import: upstream scripts and templates not bundled.
Skill liên quan
- ot-ics – Đánh giá bảo mật OT/ICS có ủy quyền: rà soát phân vùng theo mô hình Purdue, phơi nhiễm…
- outreachgenie-list-audit – Kiểm tra các danh sách khách hàng tiềm năng đã lưu của OutreachGenie theo quy trình…
- patch-diff-exploit – Tìm bản vá lỗ hổng trong các bản cập nhật của nhà cung cấp, so sánh diff binary qua các…
- pentest-checklist – Cung cấp danh sách kiểm tra toàn diện để lập kế hoạch, thực hiện và theo dõi các bài…
- pentest-commands – Cung cấp tài liệu tham chiếu lệnh đầy đủ cho các công cụ kiểm thử xâm nhập, bao gồm quét…
- pentest-tools – Vận hành hơn 20 công cụ kiểm thử xâm nhập (Nmap, Nuclei, SQLMap, FFUF, Hashcat và nhiều…
- production-audit – Kiểm tra kho mã đã phát hành để tìm khoảng trống sẵn sàng sản xuất về RLS, webhook, bí…
- production-code-audit – Kiểm tra mã nguồn có phạm vi rõ ràng để tìm vấn đề bảo mật, tính đúng đắn và hiệu năng…