Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 4.1.3.19 CIS requirement for RHEL8 and RHEL9 #10491

Merged

Conversation

marcusburghardt
Copy link
Member

Description:

Include a rule required by CIS for RHEL8 and RHEL9.
It satisfies the 4.1.3.19 requirement, which asks to collect logs about kernel module loading, unloading and modification.

Rationale:

Better CIS coverage for RHEL

@marcusburghardt marcusburghardt added New Rule Issues or pull requests related to new Rules. RHEL9 Red Hat Enterprise Linux 9 product related. RHEL8 Red Hat Enterprise Linux 8 product related. CIS CIS Benchmark related. labels Apr 25, 2023
@marcusburghardt marcusburghardt added this to the 0.1.68 milestone Apr 25, 2023
@marcusburghardt marcusburghardt requested a review from a team as a code owner April 25, 2023 13:05
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@github-actions
Copy link

github-actions bot commented Apr 25, 2023

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
New content has different text for rule 'xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_finit'.
--- xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_finit
+++ xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_finit
@@ -413,7 +413,7 @@
 RHEL-08-030360
 
 [reference]:
-4.1.15
+4.1.3.19
 
 [reference]:
 SV-230438r810464_rule

New content has different text for rule 'xccdf_org.ssgproject.content_rule_audit_rules_privileged_commands_kmod'.
--- xccdf_org.ssgproject.content_rule_audit_rules_privileged_commands_kmod
+++ xccdf_org.ssgproject.content_rule_audit_rules_privileged_commands_kmod
@@ -78,6 +78,9 @@
 RHEL-08-030580
 
 [reference]:
+4.1.3.19
+
+[reference]:
 SV-230465r627750_rule
 
 [rationale]:

@marcusburghardt marcusburghardt force-pushed the cis_audit_kernel_modules branch 2 times, most recently from 957b1de to 8d8262c Compare April 26, 2023 07:37
@vojtapolasek vojtapolasek self-assigned this Apr 26, 2023
Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you for the changes. PR looks good, just two minor issue. Please check my comments.


references:
cis@alinux3: 4.1.3.26
cis@rhel7: 4.1.16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused about this line... you are adding the reference, but the rule is not added to the respective profile. Also upon inspection of the latest ICS benchmark for RHEL 7, I can't find mention of this syscall.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. It was included by mistake there. The changes in this commit are only for RHEL 8 and RHEL 9. I will amend the respective commit to avoid confusion.

Enabled the audit_rules_kernel_module_loading_create rule for RHEL8 and
RHEL9.
Include a rule required by CIS for RHEL8 and RHEL9. It safisfies the
4.1.3.19 requirement, which asks to collect logs about kernel module
loading, unloading and modification.
This requirement is now complete and better aligned to the CIS Benchmark
for RHEL8 and RHEL9.
This rule was based on another rule and during the description
modification, one line was missed making the sentence incomplete.
The beginning of the sentence has been corrected.
@codeclimate
Copy link

codeclimate bot commented Apr 27, 2023

Code Climate has analyzed commit 12305ec 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 52.4% (0.0% change).

View more on Code Climate.

Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. Thank you.

@vojtapolasek vojtapolasek merged commit 6cb16a0 into ComplianceAsCode:master Apr 27, 2023
@marcusburghardt marcusburghardt deleted the cis_audit_kernel_modules branch April 27, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CIS CIS Benchmark related. New Rule Issues or pull requests related to new Rules. RHEL8 Red Hat Enterprise Linux 8 product related. RHEL9 Red Hat Enterprise Linux 9 product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants