← Back to Skills Marketplace
lolaopenclaw

Canary Deploy

by lolaopenclaw · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
360
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install canary-deploy
Description
Safe system changes with automatic baseline capture, canary testing, and rollback for critical infrastructure modifications. Use when making changes to SSH c...
README (SKILL.md)

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

# 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

# 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.

Usage Guidance
This skill appears to implement what it claims, but review and do not run it blindly on production machines. Before using: (1) Inspect the two scripts yourself — they run arbitrary shell commands you supply (critical-update.sh uses eval) and use sudo for restore/firewall checks; avoid passing untrusted input to --command or --validate. (2) Ensure required utilities are present (ssh, ss, systemctl, jq, host, md5sum, ufw if used) and install them deliberately. (3) Test in an isolated VM or staging environment and use the --dry-run flag first. (4) Consider changing CANARY_DIR from /tmp to a secure location if you need persistent backups, and ensure backup files are protected. (5) Confirm the referenced config paths and service names match your system (remove or adapt openclaw-gateway entry if irrelevant). If you need lower risk, replace eval usage with explicit command execution or a safer wrapper that validates inputs before running.
Capability Analysis
Type: OpenClaw Skill Name: canary-deploy Version: 1.0.0 The `scripts/critical-update.sh` file uses `eval` to execute user-provided `--command` and `--validate` arguments. This constitutes a direct Remote Code Execution (RCE) vulnerability, allowing arbitrary shell commands to be executed with the privileges of the script. While the skill's stated purpose is to apply system changes, this method of execution is inherently high-risk and could be exploited if the agent or user provides malicious input, even though there is no clear evidence of intentional malicious behavior (e.g., data exfiltration or persistence) within the skill's design itself.
Capability Assessment
Purpose & Capability
The skill claims to perform safe canary deployments and included scripts implement baseline capture, validation, backup and rollback — this matches the description. However the registry metadata declares no required binaries or env vars while the scripts call many system utilities (ssh, ss, systemctl, sudo, ufw, host, md5sum, jq, awk, sed, grep, cp, etc.). The omission of those runtime requirements is an inconsistency the operator should be aware of.
Instruction Scope
SKILL.md tells users to run the included scripts which primarily inspect local system state and restore local backups — that is in-scope. Concerns: critical-update.sh uses eval to execute the provided --command and --validate strings (arbitrary shell execution), and the scripts call sudo for actions (ufw status, cp during rollback) which will run privileged operations. The scripts also reference platform-specific service names (openclaw-gateway) and specific config paths (/etc/ssh/sshd_config, /etc/ufw/user.rules) — expected but worth reviewing for your environment. There are no external network exfiltration endpoints.
Install Mechanism
No install spec (instruction-only plus included scripts). This is the lowest install risk — nothing is downloaded or automatically written somewhere during installation.
Credentials
The skill declares no required env vars and only optionally respects CANARY_DIR to override /tmp/canary-deploy. That is reasonable. However the scripts implicitly depend on local sudo privileges and on tools (jq, host, ss, systemctl, md5sum). These are not declared in metadata and some (sudo/writable backups) require elevated rights — make sure the operator understands and restricts who runs the scripts.
Persistence & Privilege
The skill does not request permanent platform presence (always:false). It writes baseline and backups by default to /tmp/canary-deploy and logs to $CANARY_DIR/changelog.log. It performs privileged operations via sudo when restoring or querying firewall/state. This is expected for a system-change helper but increases blast radius if run by an untrusted agent or user.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install canary-deploy
  3. After installation, invoke the skill by name or use /canary-deploy
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: canary-test.sh + critical-update.sh for safe system changes with baseline capture, validation, and automatic rollback
Metadata
Slug canary-deploy
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Canary Deploy?

Safe system changes with automatic baseline capture, canary testing, and rollback for critical infrastructure modifications. Use when making changes to SSH c... It is an AI Agent Skill for Claude Code / OpenClaw, with 360 downloads so far.

How do I install Canary Deploy?

Run "/install canary-deploy" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Canary Deploy free?

Yes, Canary Deploy is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Canary Deploy support?

Canary Deploy is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Canary Deploy?

It is built and maintained by lolaopenclaw (@lolaopenclaw); the current version is v1.0.0.

💬 Comments