openclaw-deployment-hardening
它能做什么
这个工具可以帮助你让 OpenClaw 系统的部署更加安全。它会在部署前、部署中和部署后检查安全问题,比如代码和配置中的漏洞,并确保只有授权用户才能访问。
适用场景
- ✓在把 OpenClaw 系统投入生产环境之前。
- ✓更新现有的 OpenClaw 系统时。
- ✓如果你怀疑 OpenClaw 系统可能已被入侵。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openclaw-deployment-hardening/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在把我的 OpenClaw 部署投入生产之前,帮我检查一下安全性。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会自动运行检查,找出代码、配置以及 OpenClaw 运行环境中的安全漏洞。它还会确保系统以最小必要权限运行,并保护敏感数据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
OpenClaw Deployment Hardening
Use this skill to add repeatable security gates around OpenClaw build and deployment workflows.
Enforce a Secure Build Pipeline
Add mandatory controls to CI before artifacts are promoted:
- Dependency and lockfile vulnerability scan (fail on critical CVEs).
- Image scan for OS/package vulnerabilities.
- Secret scanning across source and build context.
- SBOM generation and artifact signing.
- Policy check that blocks deploy when controls fail.
Example CI step order:
# Build
npm ci
npm run build
# Security gates
trivy fs .
trivy image my-registry/openclaw:${GIT_SHA}
syft my-registry/openclaw:${GIT_SHA} -o spdx-json > sbom.json
cosign sign --key cosign.key my-registry/openclaw:${GIT_SHA}
Lock Down Container Runtime
Run OpenClaw with restrictive defaults:
- Non-root user in container
- Read-only root filesystem where possible
- Drop all Linux capabilities, add back only required
no-new-privilegesenabled- Constrained CPU/memory limits to reduce abuse impact
- Seccomp/AppArmor (or equivalent) profile enforced
Kubernetes-oriented expectations:
runAsNonRoot: trueallowPrivilegeEscalation: falsereadOnlyRootFilesystem: true- network policy deny-all baseline with explicit allow rules
Gate Production Promotion
Require explicit promotion checks:
- Security sign-off on CVE exceptions.
- Signed artifact verification in deployment stage.
- Drift check between expected and live manifest values.
- Deployment only from immutable tags or digests.
Avoid mutable latest tags for production OpenClaw services.
Protect Data and Session Surfaces
- Minimize prompt/response retention by policy.
- Mask secrets and PII in logs before shipping to SIEM.
- Encrypt persistent volumes and backups.
- Isolate tenant/session data boundaries when serving multiple teams.
Post-Deploy Verification
Run a hardening smoke test immediately after rollout:
kubectl get pods -n openclaw
kubectl auth can-i --as=system:serviceaccount:openclaw:default list secrets -n openclaw
kubectl get networkpolicy -n openclaw
kubectl logs deploy/openclaw -n openclaw --tail=200
Verify:
- Pod security context matches policy.
- Service account permissions are least privilege.
- Ingress auth/rate limits are effective.
- No plaintext secrets appear in logs.
Incident-Ready Rollback Pattern
Maintain a hardened rollback workflow:
- Freeze further rollouts.
- Revoke suspect tokens and rotate secrets.
- Roll back to last signed known-good image digest.
- Re-run post-deploy hardening verification.
- Capture timeline and artifacts for forensics.
Related Skills
- container-hardening (
container-hardening) - Container security baseline controls - kubernetes-hardening (
kubernetes-hardening) - Pod and cluster hardening patterns - sbom-supply-chain (
sbom-supply-chain) - SBOM, signing, and provenance controls
When to Use
- You need the security workflow covered by this skill (secrets, scanning, network defense, operations, AI security) inside an authorized scope.
Limitations
- Apply guidance only within authorized scope; test destructive steps in non-production first.
- Docs-only import: upstream scripts and templates not bundled.
Example
# Read-only first: inventory before any active step.
which <tool> && <tool> --help | head -n 20
Adapted from BagelHole/DevOps-Security-Agent-Skills (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
常见问题
什么是“安全关卡”?
这是一些强制性的检查点,系统必须通过它们才能进入下一阶段,比如投入生产环境,以确保系统是安全的。
什么是 SBOM?
SBOM 是 “Software Bill of Materials”(软件物料清单)的缩写。它就像软件的配料表,详细列出构建该软件时用到的所有组件。
“非 root 用户”和“只读文件系统”是什么意思?
以“非 root 用户”身份运行,意味着使用权限较少的账户,即使出了问题,损失也会受到限制。“只读文件系统”则禁止系统修改自身的文件,从而增强安全性。
详情
作者的原始描述
Secure OpenClaw deployments with preflight hardening checks, CI/CD guardrails, container runtime restrictions, and post-deploy verification.
热度
- GitHub 星标
- 48k
- 排名
- #5378
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。