跳到正文
Skillpedia
部署与云(DevOps)48k · #5378

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openclaw-deployment-hardening/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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:

  1. Dependency and lockfile vulnerability scan (fail on critical CVEs).
  2. Image scan for OS/package vulnerabilities.
  3. Secret scanning across source and build context.
  4. SBOM generation and artifact signing.
  5. 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-privileges enabled
  • Constrained CPU/memory limits to reduce abuse impact
  • Seccomp/AppArmor (or equivalent) profile enforced

Kubernetes-oriented expectations:

  • runAsNonRoot: true
  • allowPrivilegeEscalation: false
  • readOnlyRootFilesystem: 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:

  1. Freeze further rollouts.
  2. Revoke suspect tokens and rotate secrets.
  3. Roll back to last signed known-good image digest.
  4. Re-run post-deploy hardening verification.
  5. 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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5378
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能