feat(hardening): where the OS runs and whose CPU it is, and installing the CPU microcode, 4.53.0 (NetOrk/netork#2838)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 1m11s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / lowest (pull_request) Successful in 34s
driver / build (pull_request) Successful in 27s
driver / types (pull_request) Successful in 1m50s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 2m12s
driver / publish (pull_request) Skipped

get_hardening() reads virtualization (systemd-detect-virt, else the cpuinfo
hypervisor flag) and cpu_vendor. CpuMicrocodeMixin.install_cpu_microcode()
refuses a guest, picks the package of the distribution and CPU vendor
(microcode_package), adds Debian's firmware component to Debian's own sources
where it is missing, reloads the index and installs the package; it loads at
the next boot.
This commit is contained in:
christianmanivong committed 2026-11-29 00:06:50 +01:00
1 parent 5faf9a1021
commit 7451fc9dfc
8 files changed
+913 -3

No files matched your search

+5 -1
View File
@@ -129,6 +129,9 @@ else Zabbix's repository, configure, firewall, enable and restart; the driver wr
configuration and opens the firewall; an `active_only` agent gets `StartAgents=0` and no
firewall opening), `EnsurePackageMixin.ensure_package(name)`,
`PackageProxyMixin.configure_package_proxy(url)`,
`CpuMicrocodeMixin.install_cpu_microcode()` (the CPU vendor's microcode on a host that runs
on its own CPU; on Debian with its archive's firmware component added first;
`napalm_device_types.cpu_microcode`),
`TimeSyncMixin.configure_time_sync(ntp_servers, timezone)` and
`ContainerEngineMixin.grant_container_engine_access(user)`. A driver whose device takes the
change in one call overrides the template method. A driver mixes in the fixes its device
@@ -174,7 +177,8 @@ its kernel and its own tools say it, in one read-only command. The active securi
the one part that needs root), the crypto policy (`update-crypto-policies --show`) and FIPS
mode, the kernel's answer for each CPU vulnerability (`/sys/devices/system/cpu/vulnerabilities`,
put in one word by `cpu_vulnerability_state`), `mitigations=` and `nosmt` from the kernel
command line, and `ID`/`ID_LIKE` from `/etc/os-release`. Read as root first and, where root
command line, `ID`/`ID_LIKE` from `/etc/os-release`, whether the host runs virtualized
(`systemd-detect-virt`, else the `hypervisor` CPU flag) and the CPU's `vendor_id`. Read as root first and, where root
is refused, as the login user without the profile counts. A driver supplies
`_run_hardening_command(command, privileged=)`; what was not read is `None`, never "off".