Repository navigation
Install updates from the Vulnerabilities extension: Linux, Windows and whole resources - #173
Merged
Merged
Conversation
…d whole resources A new setting, off by default, adds two CloudBolt actions that the extension creates, so role permissions, Requires approval, bulk runs and MCP apply: - Install Updates on a server: installs every update the server's own source offers, restarts it when that is needed and allowed, removes old kernels, rescans, and shows the counts before and after on the Vulnerabilities tab. - Install Updates on All Servers on a resource: the same, one server at a time, stopping at the first failure. RHEL and Oracle Linux 8-10 and Amazon Linux 2023 use dnf, Ubuntu 22.04 and 24.04 use apt-get dist-upgrade, Windows Server 2022 and 2025 use the built-in Windows Update Agent from the configured source. - The install runs detached in the guest (a transient systemd unit, or a SYSTEM scheduled task because the Windows Update Agent refuses download and install from a remote session) and the job polls it. - The restart is issued from inside the guest; the job waits for a new boot identifier. - Old kernels are removed once the server runs its newest kernel; on Ubuntu by package name, because apt protects the previous kernel and its vulnerabilities would stay listed. A setting turns this off. - On Ubuntu the worker excludes its own unit from needrestart for the run; otherwise needrestart restarts it after libc6 is upgraded. - Refused before any change: a Configuration Manager client, a Windows workstation, another Windows version, another Linux distribution, a server in an Unassigned group, and everything while the setting is off. - vuln_api.py gives plug-ins scan_and_wait, install_updates and install_updates_on_resource. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…eason; record the RHEL test A Red Hat cloud image that is not registered prints the subscription-manager plug-in's lines before every dnf answer, and they were taken as the reason a restart is needed. The README now states what dnf remove --oldinstallonly keeps and lists what Install updates was tested on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s in bulk, drop archived servers The Servers view gets filters for group, OS build, owner and environment, a With a fix column and filter, sortable headers, and a checkbox column that starts Install updates on the selected servers through the action itself, so approval, permissions and the display condition still apply. Servers that are archived or gone in CloudBolt are removed from the findings store when the page loads and are never listed. Store schema 4 adds owner and OS build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…st's script filter Both were flagged by code scanning. The page header already carries the Vulnerability settings button, so the bulk bar no longer builds a second link from a page attribute. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… shown as queued Also says "1 of 1 server" in the pager line. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sts covered Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new setting, Servers updated at the same time (default 5), throttles how many servers a bulk run updates and restarts together; the scan after each update still follows the matches-at-once limit. A single server and the resource-wide run are unchanged. A cancel now stops every server before its next step. Also widens a test's script-tag filter that code scanning flagged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… and of cancelling a run Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The Vulnerabilities extension (
extensions/XUI-wqrj0e3p) can now fix what it finds. A new setting, off by default, adds two actions:Both are ordinary CloudBolt actions that the extension creates, so role permissions, Requires approval, bulk runs and MCP apply. The tab buttons open the actions' own dialogs. Nothing runs while the setting is off, and never on a server in an Unassigned group.
dnf -y --refresh upgrade--releasever=latest(its repositories are locked to the image's release)apt-get update, then a non-interactivedist-upgradeHow it works:
New settings: Offer Install updates (off), Remove old kernels after a restart (on), minutes to wait for a restarted server (60), minutes allowed for installing (90).
vuln_api.pygives plug-insscan_and_wait,install_updatesandinstall_updates_on_resource.Testing
967 unit tests pass (
python -B -m unittest discover -s extensions/XUI-wqrj0e3p/tests -p "test_*.py"). Each step was reviewed independently before it was tested live.Live on a development appliance:
Also seen live: the setting creates both actions and the dialogs show the restart option; the action is not offered on a server in an Unassigned group; Scan all servers is refused while a resource update runs, and so is a second resource run; the tab shows the running step and the result line.
What remains after updating is software the package manager does not own (libraries bundled inside agents and tools). It stays listed with a fix version.
Not verified
Added after the first review: bulk updates from Vulnerability Search
The Servers view of the admin page now:
Tested live for this part:
Not tested for this part: more than one page of servers and "Select all N matching" (the lab has 12 scanned servers), Requires approval on a bulk run, more than one scan after an update at the same time, a run that reaches the job's time limit, a VMware server (the lab appliance cannot reach the ESXi hosts for guest scripts), and a successful update on OpenShift Virtualization (the lab's only image there is unregistered RHEL on CentOS Stream repositories).
After merge
Sync
extensions/XUI-wqrj0e3pfrommainand recycle the web workers. The actions do not exist until an administrator turns on Offer Install updates in Vulnerability Settings.🤖 Generated with Claude Code