Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Auto-Heal 通用守护

v1.0.0

自动监测并修复HTTP、端口、进程等服务异常,支持回滚到稳定状态,防止级联故障并发送告警。

0· 100·0 current·0 all-time
byjune@panjun2026

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for panjun2026/pan-auto-heal.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Auto-Heal 通用守护" (panjun2026/pan-auto-heal) from ClawHub.
Skill page: https://clawhub.ai/panjun2026/pan-auto-heal
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install pan-auto-heal

ClawHub CLI

Package manager switcher

npx clawhub@latest install pan-auto-heal
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
技能的名称/描述为“自动检测并修复服务”,这与脚本提供的功能一致. 不过 registry 元数据声明不需要任何二进制或环境变量,而脚本明确依赖 jq(check_deps)、ss、pgrep、curl 等工具;这在元数据与实际实现间存在不一致,值得注意。
!
Instruction Scope
SKILL.md 与 guard.sh 指示用户在 services.json 中配置检查、fix、rollback 命令;脚本通过 eval 执行 fix/rollback 以及 cmd 类型的检查命令(evaluate user-provided shell),并且健康检查可对任意 URL 发起 curl 请求。允许执行任意命令是该工具功能的一部分,但也意味着一个恶意或误配置的 services.json 能在执行者权限范围内运行任意代码(包括网络请求、泄露/覆盖文件、重启服务等)。SKILL.md 示例中还出现了将密码直接放在命令行(mysqladmin -psecret)的示例,增加了泄露风险。
Install Mechanism
无 install spec(instruction-only),因此没有下载或写入外部代码的风险,这是低风险安装方式。但脚本会创建/写入日志到 /var/log/auto-heal.log 并假定系统上有 jq、ss、curl、pgrep 等工具。
Credentials
技能未请求环境变量或外部凭据(符合元数据),但实现会 log 命令输出到 /var/log,并且示例配置中展示了在命令行中明文放置密码。即使不声明环境变量,用户传入的命令或 URL 可能包含凭据或导致外发敏感数据,配置文件需严格保护。
Persistence & Privilege
技能本身未设置 always:true,也不会自动持久化;SKILL.md 建议将脚本加入 cron,这需要用户/管理员操作并可能以 root 身份运行。若以高权限运行,脚本执行的 fix/rollback/cmd 会有很大破坏/滥用范围;请谨慎决定运行用户与文件权限。
Scan Findings in Context
[shell-eval-exec] expected: 脚本使用 eval 来执行 services.json 中的 fix/rollback/cmd 字段。对于通用守护脚本,这是功能上预期的,但带来命令注入/任意命令执行风险,需确保配置文件来源可信并做好权限控制。
[network-calls-curl] expected: 脚本使用 curl 执行 HTTP 健康检查(http 类型),这符合其目的。但允许 arbitrary URLs 意味着健康检查本身可能被用作外部连通性探测或数据泄露通道(尤其当命令输出包含敏感信息并被上传或触发外部请求时)。
[writes-system-log] expected: 脚本写入 /var/log/auto-heal.log(通过 tee -a),这便于审计但也会将执行输出/潜在敏感信息持久化到系统日志,应注意日志权限与敏感信息避免被记录。
[example-contains-credentials] unexpected: references/examples.md 示例包含像 mysqladmin -u root -psecret 这样的明文密码示例。这 is not required by the tool but encourages insecure practice (embedding secrets in config/commands).
What to consider before installing
该技能的功能与描述一致:它从用户提供的 services.json 中读取检查和修复命令并执行。主要风险来自于它会执行配置内任意 shell 命令(eval),并把输出写入系统日志。 Before installing or running: - Treat services.json as highly privileged: only place commands you trust; never include plaintext passwords or credentials in commands. - Run the script under a least-privileged account (avoid root) or use sudo rules that limit what commands can be run. - Protect the config and log files with strict file permissions (chmod 600, owned by a dedicated user). - Prefer explicit, safe fix/rollback commands (avoid cmd type when possible) and avoid network calls to untrusted endpoints. - Consider code review or sandboxed testing on a non-production host first. - If you will add it to cron/autorun, ensure the cron entry runs as a controlled user and verify all configured commands. If you cannot guarantee trusted config and restricted runtime privileges, do not run this script in production.

Like a lobster shell, security has layers — review code before you run it.

latestvk970t2mjdgk7e0tz7zkhhqtccn83pnd8
100downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Auto-Heal 通用守护框架

核心机制

检测 → 修复 → 回滚 → 告警

检测:探活测试(HTTP/端口/进程/功能) 修复:重启/重试/切换 回滚:恢复到上一稳定状态 告警:记录并通知

快速开始

1. 定义要守护的服务

编辑 services.json

{
  "services": [
    {
      "name": "nginx",
      "check": {
        "type": "port",
        "target": 80
      },
      "fix": "systemctl restart nginx",
      "rollback": "systemctl restart nginx",
      "timeout": 5
    },
    {
      "name": "web-api",
      "check": {
        "type": "http",
        "url": "https://api.example.com/health",
        "expected": "200"
      },
      "fix": "systemctl restart api && sleep 3",
      "rollback": "cp /etc/api/backup.json /etc/api/config.json && systemctl restart api",
      "backup_dir": "/etc/api/backups"
    }
  ]
}

2. 运行守护

./guard.sh services.json

3. 添加到 cron(每5分钟检查)

*/5 * * * * /path/to/guard.sh /path/to/services.json >> /var/log/guard.log 2>&1

检查类型

类型配置说明
port{"type": "port", "target": 8080}端口是否监听
process{"type": "process", "name": "nginx"}进程是否存在
http{"type": "http", "url": "...", "expected": "200"}HTTP 状态码
cmd{"type": "cmd", "command": "pgrep -x myapp"}自定义命令(返回0=正常)

框架流程

1. 解析配置文件
2. 遍历每个服务
3. 执行检测
   ├─ 正常 → 记录,跳过
   └─ 异常 → 进入修复流程
4. 修复
   ├─ 执行修复命令
   ├─ 重新检测
   │   ├─ 正常 → 恢复,记录"自愈成功"
   │   └─ 仍异常 → 回滚
5. 回滚
   ├─ 尝试回滚
   ├─ 重新检测
   │   ├─ 正常 → 恢复,记录"回滚成功"
   │   └─ 仍异常 → 告警(需人工介入)

配置字段说明

字段必填说明
name服务名称(唯一标识)
check检测配置
fix修复命令
rollback回滚命令(不填则跳过)
timeout检测超时(秒),默认5
backup_dir自动备份目录(保留最近10份)
enabledtrue/false,默认true

示例配置

详见 references/examples.md

  • Nginx 反向代理
  • Docker 容器
  • AI API 服务
  • 数据库主从切换

日志格式

[2026-03-27 10:00:00] [nginx] 检测正常
[2026-03-27 10:05:00] [api] 检测失败 → 执行修复...
[2026-03-27 10:05:03] [api] 修复成功,自愈用时3秒
[2026-03-27 10:10:00] [db] 检测失败 → 执行修复... → 修复失败 → 回滚...
[2026-03-27 10:10:06] [db] 回滚成功
[2026-03-27 10:15:00] [cache] 检测失败 → 修复失败 → 回滚失败 → 告警:请人工介入

Comments

Loading comments...