content
                                
                                
                                
                                    content copied to clipboard
                            
                            
                            
                        Update sysctl template's OVAL and tests to align with STIG
Description:
- Update OVAL to allow multiple static values, but ensure all of them are valid
 - Update tests to validate new behavior
 - The code to generate 
SYSCTL_WRONG_VALUEwas updated since the tests were having an issue when setting the runtime value. Apparently the previous way of obtaining that value was generating invalid confs 
Rationale:
- The condition to only accept one configuration was introduced here: https://github.com/ComplianceAsCode/content/pull/8656 as a STIG alignment. But now the STIG requirement has been updated from
 
If results are returned from more than one file location, this is a finding.
to
If conflicting results are returned, this is a finding.
Hello @Xeicker! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file 
shared/templates/sysctl/template.py: 
Line 40:72: E228 missing whitespace around modulo operator
Hi @Xeicker. Thanks for your PR.
I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Start a new ephemeral environment with changes proposed in this pull request:
@Xeicker Thank you for the update, could you address the issue pointed out by CodeClimate?
Missing whitespace around modulo operator
I don't know what is going on with the CI, it is complaining that two rules have the same CCE, but they have completely unrelated CCEs.
 44/164 Test  #44: unique-cces .........................................................***Failed    0.37 sec
cce CCE-91667-6 is included in files: 
 - linux_os/guide/services/cron_and_at/file_permissions_crontab/rule.yml
 - linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml
Does anybody from @ComplianceAsCode/red-hatters have any idea what is going on?
I don't know what is going on with the CI, it is complaining that two rules have the same CCE, but they have completely unrelated CCEs.
44/164 Test #44: unique-cces .........................................................***Failed 0.37 sec cce CCE-91667-6 is included in files: - linux_os/guide/services/cron_and_at/file_permissions_crontab/rule.yml - linux_os/guide/services/cron_and_at/service_cron_enabled/rule.ymlDoes anybody from @ComplianceAsCode/red-hatters have any idea what is going on?
That should be fixed by #9622.
@Mab879 So does @Xeicker need to rebase latest master?
@Mab879 So does @Xeicker need to rebase latest master?
Yes
There was a github outage yesterday and that's probably why the github checks have not started. https://www.githubstatus.com/history
@Xeicker can you please amend the last commit message and force push so it can trigger the required jobs?
Thank you.
Code Climate has analyzed commit e33aaaab and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 40.8% (0.0% change).
View more on Code Climate.