mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
Removing a rule from guidance will not remove the rule from audit file #243
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 @jmahlman on GitHub.
Originally assigned to: @brodjieski on GitHub.
Summary
When removing rules from a custom baseline, the affected rule is not removed from the audit file if the compliance check and fix were run on a machine.
Steps to reproduce
Operating System version
12.4 (21F79)
12.5b3
What is the current bug behavior?
The removed rule remains in the audit file and keep the result from the last run.
What is the expected correct behavior?
The removed rule should be removed from the audit file.
Possible fixes
@jmahlman commented on GitHub:
I have run the following tests successfully:
/path/to/cis_script.sh --resetResult: Removed audit file properly and dropped into menu
/path/to/cis_script.sh --check --resetResult: Removed audit file and ran fresh check.
Run script via Jamf policy with
--checkas parameter 4 and--resetad parameter 5Result: Removed audit file and ran a clean check removing the changed rules
I'd say this is a pretty good solution, just include the proper documentation that if it needs to be run from Jamf that the flags need to be in different parameters..unless I;'m the only idiot who didn't know that ;)
@robertgendler commented on GitHub:
Potential fix add --reset