rules/os/os_library_validation_enabled.yaml fails with: "run_fix:242: command not found: This" #233

Closed
opened 2026-01-19 18:29:45 +00:00 by michael · 2 comments
Owner

Originally created by @marcindulak on GitHub.

Summary

rules/os/os_library_validation_enabled.yaml fails with: "run_fix:242: command not found: This"

Steps to reproduce

On a fresh system, execute the compliance script generated from baseline (e.g. https://github.com/usnistgov/macos_security/blob/main/baselines/cis_lvl2.yaml) which includes this rule.

Operating System version

sw_vers
# Output:
# ProductName:      macOS
# ProductVersion:   12.5.1
# BuildVersion:     21G83

What is the current bug behavior?

# Running the command to configure the settings for: os_library_validation_enabled ...
# run_fix:242: command not found: This

What is the expected correct behavior?

No error.

# Running the command to configure the settings for: os_library_validation_enabled ...

Relevant logs and/or screenshots

Output of checks

# Running the command to configure the settings for: os_library_validation_enabled ...
# run_fix:242: command not found: This

Possible fixes

The issue is that the fix is set as [source,bash]

06cc0d2614/rules/os/os_library_validation_enabled.yaml (L12-L16)

To fix, treat the comment as text:

 fix: | 
   This is implemented by a Configuration Profile. 

The issue appears to be present only in rules/os/os_library_validation_enabled.yaml

# grep "This is implemented" -B 2 -r rules | grep bash
# rules/os/os_library_validation_enabled.yaml-  [source,bash]
Originally created by @marcindulak on GitHub. <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label and verify the issue you're about to submit isn't a duplicate. ---> ### Summary rules/os/os_library_validation_enabled.yaml fails with: "run_fix:242: command not found: This" ### Steps to reproduce On a fresh system, execute the compliance script generated from baseline (e.g. https://github.com/usnistgov/macos_security/blob/main/baselines/cis_lvl2.yaml) which includes this rule. ### Operating System version ``` sw_vers # Output: # ProductName:      macOS # ProductVersion:   12.5.1 # BuildVersion:     21G83 ``` ### What is the current *bug* behavior? ``` # Running the command to configure the settings for: os_library_validation_enabled ... # run_fix:242: command not found: This ``` ### What is the expected *correct* behavior? No error. ``` # Running the command to configure the settings for: os_library_validation_enabled ... ``` ### Relevant logs and/or screenshots ### Output of checks ``` # Running the command to configure the settings for: os_library_validation_enabled ... # run_fix:242: command not found: This ``` ### Possible fixes The issue is that the fix is set as `[source,bash]` https://github.com/usnistgov/macos_security/blob/06cc0d2614da5b6f478b6f1ff45b059bb7c6aa5a/rules/os/os_library_validation_enabled.yaml#L12-L16 To fix, treat the comment as text: ``` fix: | This is implemented by a Configuration Profile. ``` The issue appears to be present only in `rules/os/os_library_validation_enabled.yaml` ``` # grep "This is implemented" -B 2 -r rules | grep bash # rules/os/os_library_validation_enabled.yaml- [source,bash] ```
Author
Owner

@robertgendler commented on GitHub:

The issue appears to be because for some reason we included the [source,bash]. This appears to be fixed in all other branches. Feel free to pull and build off of the OS branches for the most up to date fixes on issues.

@robertgendler commented on GitHub: The issue appears to be because for some reason we included the `[source,bash]`. This appears to be fixed in all other branches. Feel free to pull and build off of the OS branches for the most up to date fixes on issues.
Author
Owner

@marcindulak commented on GitHub:

Thanks, I see this was fixed in 1bea03ade9.

@marcindulak commented on GitHub: Thanks, I see this was fixed in https://github.com/usnistgov/macos_security/commit/1bea03ade9f3217d901f0b43c22ef394d97e4969.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#233