Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixed rules for the SCA file cis_ubuntu22-04.yml
Configuration options
28532:
When Apport Error Reporting service is not installed when running the following command "Failed to get unit file state for apport.service: No such file or directory" is returned.
Changing this to the following code fixes the issue.
28532:
Changing this to the following code fixes the issue
28566:
When rsync is not installed when running the following command "Failed to get unit file state for rsync.service: No such file or directory" is returned.
Changing this to the following code fixes the issue
28653:
There is an extra -> at both rules removing the second arrow fixes the issue
28664:
Cis recommends setting the ENCRYPT_METHOD to yescrypt and when implementing CIS 5.4.3 yescrypt is added to the /etc/pam.d/common-passwords file. Excluding yescrypt ensures passing the SCA test while still passing the CIS benchmark.
Changing this to the following code fixes the issue
28663:
For this CIS rule you configure the line "password [success=1 default=ignore] pam_unix.so ovscure use_authok try_first_pass yescrypt remember=5" This SCA rule checks if the line is there but this line has an ^ while checking the middle of the line thus returning false.
Removing the ^ fixes the issue
28665:
This rule has an ^ in the wrong spot thus returning false.
Removing the ^ fixes the issue
28534:
These rules check the following files for text. But this generated file had a combination of tabs and spaces for some reason. This code only checks for extra spaces and not tabs so failing in some cases.
Adding \t* to the rules fixes the issue
Tests