mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 05:53:24 +00:00
os_recovery_lock_enable has incorrect key #235
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cipineda on GitHub.
Originally assigned to: @robertgendler on GitHub.
Summary
os_recovery_lock_enable looks for ‘IsRecoveryLockedEnabled’ and should be ‘IsRecoveryLockEnabled’
replace word "Locked" with "Lock"
Steps to reproduce
Run the os_recovery_lock_enable.yaml file
Operating System version
macOS 12.4 (21F79) on M1 processor
What is the current bug behavior?
When running this validation it comes always as a finding even though I have the right profile and key in place.
(What actually happens)
querying the system as follows:
/usr/libexec/mdmclient QuerySecurityInfo | grep IsRecoveryLockEnabled
returns:
IsRecoveryLockEnabled = 1;
running the code in this yaml file:
/usr/libexec/mdmclient QuerySecurityInfo | /usr/bin/grep -c "IsRecoveryLockedEnabled = 1"
returns:
0
What is the expected correct behavior?
the yaml script should return a '1'
Possible fixes
update the yaml code to the following:
/usr/libexec/mdmclient QuerySecurityInfo | /usr/bin/grep -c "IsRecoveryLockEnabled = 1"