chef / ohai

Ohai profiles your system and emits JSON
https://docs.chef.io/ohai.html
Apache License 2.0
681 stars 452 forks source link

Add support for macOS Rapid Security Response updates #1788

Closed nstrauss closed 1 year ago

nstrauss commented 1 year ago

Description

Apple is adding a new update type to macOS called Rapid Security Responses. These updates change the build version, but not the OS version reported by sw_vers. Instead, a new ProductVersionExtra key is returned to denote a specific supplemental version only when a RSR is installed. If no RSR is installed the key is not present.

$ sw_vers
ProductName: macOS
ProductVersion: 13.3
ProductVersionExtra: (a)
BuildVersion: 22E7752300f

https://support.apple.com/guide/deployment/rapid-security-responses-dep93ff7ea78/web

This PR adds support for reporting on the RSR version when a patch is installed. The information is important to Mac admins since it gives a full picture of current OS build, whether a security vulnerability has been patched, and, depending on Apple's future plans, if there is functionality change which could impact Chef. I'll admit the spec test isn't totally useful, especially since most machines running tests likely won't have an RSR, but it does match real world scenarios.

Types of changes

Checklist:

nstrauss commented 1 year ago

Please update the commit message to match the PR wording so we have local/repo access to this history and background.

@marcparadise I've amended the commit message to match the PR.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

jaymzh commented 1 year ago

Thanks!