简介
Find and install pending updates and fix known vulnerabilities (CVEs) on the user's servers through Termalin. Use when the user asks what needs updating, whether servers are patched, about a specific CVE, about a pending reboot, or wants to update packages on one or many servers.
通过你的 Agent 添加
安装目录:security-updates/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: security-updates description: Find and install pending updates and fix known vulnerabilities (CVEs) on the user's servers through Termalin. Use when the user asks what needs updating, whether servers are patched, about a specific CVE, about a pending reboot, or wants to update packages on one or many servers.
Termalin checks every server hourly for pending updates and daily for known vulnerabilities in what is installed. Read that first; install only after the user agrees to a plan.
Look
Call updates_list: no arguments for all servers, host for one, tag for a group (e.g. "prod", "distro:ubuntu"), or cve to answer "which servers have CVE-…".
It returns per server: number of updates and security updates, security packages with target versions, whether a reboot is requested, a newer kernel installed but not running, how old the package lists are, and CVEs with severity, the fixed version and whether the flaw is known to be exploited (CISA KEV). It covers Linux (apt, dnf, zypper, apk), Windows, macOS, running containers and application dependencies.
Report the most urgent first: known-exploited CVEs, then critical and high severity, then pending reboots and stale package lists. Name the package and the fixed version. Keep the rest to counts.
Plan
Before installing, write a short plan per server and get a yes:
- what will be updated (security only, or everything);
- whether a service restarts or the server needs a reboot, and roughly when;
- for production, one server first, then the rest.
Offer a backup first on servers with data (the backups skill, backup_create with a label). A CVE in a container image or an app dependency is fixed by rebuilding or upgrading that app, not by the OS package manager: say so.
Install
Updates take minutes, so use job_start, never a single ssh_exec, and follow with job_status:
- Debian/Ubuntu:
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade(security only:sudo unattended-upgrade -vwhen it is installed). - RHEL/Alma/Rocky/Fedora:
sudo dnf -y upgrade --security(orupgrade). - openSUSE:
sudo zypper -n patch. Alpine:sudo apk upgrade. - Windows:
Install-WindowsUpdateonly when the PSWindowsUpdate module is present; otherwise tell the user to run Windows Update.
Keep -y and non-interactive flags; a prompt would hang the job.
Reboot
Never reboot without an explicit yes for that server. After a reboot, wait for the server to come back in hosts_list, then check services (systemctl --failed) or use the deploy-check skill.
Finish
Call updates_list again for the same servers and report what is left. The hourly check may lag, so mention when package lists were last read.