返回顶部
c

canary-deploy

Safe system changes with automatic baseline capture, canary testing, and rollback for critical infrastructure modifications. Use when making changes to SSH config, firewall rules, network settings, systemd services, kernel parameters, or any system change that could break remote access. Prevents lockouts by validating connectivity before and after changes. Born from a real incident where AllowTcpForwarding=no killed VPN tunnel access.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
301
下载量
0
收藏
概述
安装方式
版本历史

canary-deploy

# Canary Deploy Safe system changes with pre-flight checks, validation, and automatic rollback. ## The Problem System changes can lock you out: - SSH hardening breaks remote access - Firewall rules block needed ports - Kernel parameters cause instability - Service restarts break dependencies Recovery without physical access is painful or impossible. ## Quick Start ### Before any critical change ```bash # Capture baseline (connectivity, services, ports) bash scripts/canary-test.sh baseline # Make your change sudo nano /etc/ssh/sshd_config # Validate change didn't break anything bash scripts/canary-test.sh validate # If validation fails: bash scripts/canary-test.sh rollback ``` ### For automated changes ```bash # Full pipeline: baseline → apply → validate → rollback-if-failed bash scripts/critical-update.sh \ --name "SSH hardening" \ --backup "/etc/ssh/sshd_config" \ --command "sudo sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config && sudo systemctl reload sshd" \ --validate "ssh -o ConnectTimeout=5 localhost echo ok" ``` ## Protocol A+B (Manual Workflow) For interactive sessions where you want human-in-the-loop: ### Protocol A: Test interactively 1. Tell the human: "Open a second SSH session as backup" 2. Apply change in the first session 3. Ask: "Test connectivity from the second session" 4. If it works → confirm 5. If it fails → rollback from the backup session ### Protocol B: Backup first 1. Run `bash scripts/canary-test.sh baseline` 2. Verify backup is valid 3. Apply change 4. Run `bash scripts/canary-test.sh validate` 5. If validation fails → `bash scripts/canary-test.sh rollback` **Always use both A + B together for maximum safety.** ## What Gets Checked ### Baseline capture - SSH connectivity (local + remote) - Open ports (ss -tlnp) - Running services (systemctl) - Firewall rules (ufw/iptables) - Network routes - DNS resolution - Config file checksums ### Validation - All baseline checks re-run - Diff against baseline - Any regression = FAIL ## Critical Change Categories | Category | Risk | Example | Recovery | |----------|------|---------|----------| | SSH config | 🔴 HIGH | sshd_config changes | Backup session | | Firewall | 🔴 HIGH | UFW/iptables rules | Pre-change snapshot | | Network | 🔴 HIGH | Interface/routing changes | Console access | | Services | 🟡 MEDIUM | systemd unit changes | systemctl restart | | Kernel params | 🟡 MEDIUM | sysctl changes | Reboot to defaults | | Packages | 🟢 LOW | apt install/upgrade | apt rollback | ## References See `references/incident-report.md` for the real incident that inspired this skill.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 canary-deploy-1776275989 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 canary-deploy-1776275989 技能

通过命令行安装

skillhub install canary-deploy-1776275989

下载 Zip 包

⬇ 下载 canary-deploy v1.0.0

文件大小: 6.34 KB | 发布时间: 2026-4-16 17:54

v1.0.0 最新 2026-4-16 17:54
Initial release: canary-test.sh + critical-update.sh for safe system changes with baseline capture, validation, and automatic rollback

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部