Files
macos_security/rules/system_settings/system_settings_softwareupdate_current.yaml
Bob Gendler fe09001686 updates for DISA STIG
Signed-off-by: Bob Gendler <robert.gendler@nist.gov>
2025-12-17 15:36:35 -05:00

58 lines
1.2 KiB
YAML

id: system_settings_softwareupdate_current
title: Ensure Software Update is Updated and Current
discussion: |
Make sure Software Update is updated and current.
NOTE: Automatic fix can cause unplanned restarts and may lose work.
check: |
softwareupdate_date_epoch=$(/bin/date -j -f "%Y-%m-%d" "$(/usr/bin/defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist LastFullSuccessfulDate | /usr/bin/awk '{print $1}')" "+%s")
thirty_days_epoch=$(/bin/date -v -30d "+%s")
if [[ $softwareupdate_date_epoch -lt $thirty_days_epoch ]]; then
/bin/echo "0"
else
/bin/echo "1"
fi
result:
integer: 1
fix: |
[source,bash]
----
/usr/sbin/softwareupdate -i -a
----
NOTE - This will apply to the whole system
references:
cce:
- CCE-94398-5
cci:
- CCI-002605
800-53r5:
- N/A
800-53r4:
- N/A
srg:
- SRG-OS-000439-GPOS-00195
disa_stig:
- APPL-15-999999
800-171r3:
- N/A
cis:
benchmark:
- 1.1 (level 1)
controls v8:
- 7.3
- 7.4
bio:
- 8.08.01
macOS:
- '15.0'
tags:
- cis_lvl1
- cis_lvl2
- cisv8
- nlmapgov_base
- nlmapgov_plus
- stig
severity: medium
mobileconfig: false
mobileconfig_info: