mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
Compliance script run with --fix does not apply fixes unless --check was run first #264
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 @grismemj on GitHub.
Summary
Running the generated STIG compliance script with --fix does not actually fix issues unless --check was run first
Steps to reproduce
Operating System version
11.6.3
What is the current bug behavior?
Running the compliance script with --fix without running with --check first does not actually apply the rule fixes.
What is the expected correct behavior?
I expect if I run the compliance script with --fix, the rules will be applied. I don't see anything in the wiki that suggests --check must be run before --fix.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(Paste any output that occurs with the bug)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
@grismemj commented on GitHub:
Ok, thanks. I wasn’t necessarily expecting this since the checks and fixes are usually just simple or compound commands…
From: Dan Brodjieski @.>
Date: Thursday, January 27, 2022 at 6:17 PM
To: usnistgov/macos_security @.>
Cc: GRISMER, MATTHEW J CIV USAF AFMC AFRL/RQVC @.>, Mention @.>
Subject: [URL Verdict: Neutral][Non-DoD Source] Re: [usnistgov/macos_security] Compliance script run with --fix does not apply fixes unless --check was run first (Issue #115)
Hi @grismemjhttps://github.com/grismemj In order for the script to run commands to fix settings, it must first know which settings need to be fixed. Running a compliance scan (check) will generate the findings that the remediation can act upon.
In production environments, one would typically run a SCAN, FIX, SCAN to complete the entire operation.
I have also updated the wiki page about the compliance script that touches on this.
—
Reply to this email directly, view it on GitHubhttps://github.com/usnistgov/macos_security/issues/115#issuecomment-1023728661, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW6OSZIDMTPGTTJLLKDSF63UYHG6BANCNFSM5M7GDQAA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
@brodjieski commented on GitHub:
Hi @grismemj In order for the script to run commands to fix settings, it must first know which settings need to be fixed. Running a compliance scan (check) will generate the findings that the remediation can act upon.
In production environments, one would typically run a SCAN, FIX, SCAN to complete the entire operation.
I have also updated the wiki page about the compliance script that touches on this.