I keep my operating system updated, but the firmware underneath gets less attention. fwupdmgr security puts a number on it.
fwupd can calculate a Host Security ID, HSI for short, which rates the firmware protections of a machine from HSI:0 to HSI:5. The docs say HSI:5 cannot be reached yet, because no tests exist for it. The command needs fwupd 1.8.4 or later.
fwupdmgr security
It prints your level and a recommendation for each test that failed. I like seeing the exact test, because the cause is often a single UEFI setting I never looked at.
A ! after the level marks a runtime security issue, and it leaves the core level unchanged. The docs list these causes: UEFI Secure Boot turned off, a kernel tainted by a non-free module or a critical firmware issue, a kernel that is not locked down, an unencrypted swap partition, and custom or modified fwupd plugins. To check the Secure Boot part on its own, mokutil --sb-state answers that one question.
The result depends on what the hardware and its firmware report. A low number can simply mean the machine lacks a protection, and then no setting of yours changes it. I read the failed tests as a to-do list, ordered by how easy each one is to fix.
Further reading: Host Security ID (fwupd)