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

Exclude autrace and audispd on RHEL 10 #12736

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Dec 17, 2024

Description:

Exclude autrace and audispd on RHEL 10

Rationale:

Prep for RHEL 10

@Mab879 Mab879 added Update Rule Issues or pull requests related to Rules updates. RHEL10 Red Hat Enterprise Linux 10 product related. labels Dec 17, 2024
@Mab879 Mab879 added this to the 0.1.76 milestone Dec 17, 2024
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

Copy link

github-actions bot commented Dec 17, 2024

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_file_groupownership_audit_binaries'.
--- xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
@@ -14,7 +14,7 @@
 /sbin/ausearch root
 /sbin/autrace root
 /sbin/auditd root
-/sbin/audispd root
+
 /sbin/augenrules root
 
 

OVAL for rule 'xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries' differs.
--- oval:ssg-file_groupownership_audit_binaries:def:1
+++ oval:ssg-file_groupownership_audit_binaries:def:1
@@ -5,4 +5,3 @@
 criterion oval:ssg-test_file_groupownership_audit_binaries_3:tst:1
 criterion oval:ssg-test_file_groupownership_audit_binaries_4:tst:1
 criterion oval:ssg-test_file_groupownership_audit_binaries_5:tst:1
-criterion oval:ssg-test_file_groupownership_audit_binaries_6:tst:1

OCIL for rule 'xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries' differs.
--- ocil:ssg-file_groupownership_audit_binaries_ocil:questionnaire:1
+++ ocil:ssg-file_groupownership_audit_binaries_ocil:questionnaire:1
@@ -6,7 +6,7 @@
 /sbin/ausearch root
 /sbin/autrace root
 /sbin/auditd root
-/sbin/audispd root
+
 /sbin/augenrules root
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
@@ -3,5 +3,4 @@
 chgrp 0 /sbin/ausearch
 chgrp 0 /sbin/autrace
 chgrp 0 /sbin/auditd
-chgrp 0 /sbin/audispd
 chgrp 0 /sbin/augenrules

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_groupownership_audit_binaries
@@ -133,33 +133,6 @@
   - medium_severity
   - no_reboot_needed
 
-- name: Test for existence /sbin/audispd
-  stat:
-    path: /sbin/audispd
-  register: file_exists
-  tags:
-  - CCE-86455-3
-  - configure_strategy
-  - file_groupownership_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
-- name: Ensure group owner 0 on /sbin/audispd
-  file:
-    path: /sbin/audispd
-    group: '0'
-  when: file_exists.stat is defined and file_exists.stat.exists
-  tags:
-  - CCE-86455-3
-  - configure_strategy
-  - file_groupownership_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
 - name: Test for existence /sbin/augenrules
   stat:
     path: /sbin/augenrules

New content has different text for rule 'xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries'.
--- xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
@@ -14,7 +14,7 @@
 /sbin/ausearch root
 /sbin/autrace root
 /sbin/auditd root
-/sbin/audispd root
+
 /sbin/augenrules root
 
 

OVAL for rule 'xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries' differs.
--- oval:ssg-file_ownership_audit_binaries:def:1
+++ oval:ssg-file_ownership_audit_binaries:def:1
@@ -5,4 +5,3 @@
 criterion oval:ssg-test_file_ownership_audit_binaries_3:tst:1
 criterion oval:ssg-test_file_ownership_audit_binaries_4:tst:1
 criterion oval:ssg-test_file_ownership_audit_binaries_5:tst:1
-criterion oval:ssg-test_file_ownership_audit_binaries_6:tst:1

OCIL for rule 'xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries' differs.
--- ocil:ssg-file_ownership_audit_binaries_ocil:questionnaire:1
+++ ocil:ssg-file_ownership_audit_binaries_ocil:questionnaire:1
@@ -6,7 +6,7 @@
 /sbin/ausearch root
 /sbin/autrace root
 /sbin/auditd root
-/sbin/audispd root
+
 /sbin/augenrules root
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
@@ -3,5 +3,4 @@
 chown 0 /sbin/ausearch
 chown 0 /sbin/autrace
 chown 0 /sbin/auditd
-chown 0 /sbin/audispd
 chown 0 /sbin/augenrules

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_ownership_audit_binaries
@@ -133,33 +133,6 @@
   - medium_severity
   - no_reboot_needed
 
-- name: Test for existence /sbin/audispd
-  stat:
-    path: /sbin/audispd
-  register: file_exists
-  tags:
-  - CCE-86453-8
-  - configure_strategy
-  - file_ownership_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
-- name: Ensure owner 0 on /sbin/audispd
-  file:
-    path: /sbin/audispd
-    owner: '0'
-  when: file_exists.stat is defined and file_exists.stat.exists
-  tags:
-  - CCE-86453-8
-  - configure_strategy
-  - file_ownership_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
 - name: Test for existence /sbin/augenrules
   stat:
     path: /sbin/augenrules

New content has different text for rule 'xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries'.
--- xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
@@ -14,7 +14,6 @@
 /sbin/ausearch 755
 /sbin/autrace 755
 /sbin/auditd 755
-/sbin/audispd 755
 /sbin/augenrules 755
 
 

OVAL for rule 'xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries' differs.
--- oval:ssg-file_permissions_audit_binaries:def:1
+++ oval:ssg-file_permissions_audit_binaries:def:1
@@ -5,4 +5,3 @@
 criterion oval:ssg-test_file_permissions_audit_binaries_3:tst:1
 criterion oval:ssg-test_file_permissions_audit_binaries_4:tst:1
 criterion oval:ssg-test_file_permissions_audit_binaries_5:tst:1
-criterion oval:ssg-test_file_permissions_audit_binaries_6:tst:1

OCIL for rule 'xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries' differs.
--- ocil:ssg-file_permissions_audit_binaries_ocil:questionnaire:1
+++ ocil:ssg-file_permissions_audit_binaries_ocil:questionnaire:1
@@ -6,7 +6,7 @@
 /sbin/ausearch 755
 /sbin/autrace 755
 /sbin/auditd 755
-/sbin/audispd 755
+
 /sbin/augenrules 755
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
@@ -12,6 +12,4 @@
 
 chmod u-s,g-ws,o-wt /sbin/auditd
 
-chmod u-s,g-ws,o-wt /sbin/audispd
-
 chmod u-s,g-ws,o-wt /sbin/augenrules

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries' differs.
--- xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
+++ xccdf_org.ssgproject.content_rule_file_permissions_audit_binaries
@@ -133,33 +133,6 @@
   - medium_severity
   - no_reboot_needed
 
-- name: Test for existence /sbin/audispd
-  stat:
-    path: /sbin/audispd
-  register: file_exists
-  tags:
-  - CCE-86447-0
-  - configure_strategy
-  - file_permissions_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
-- name: Ensure permission u-s,g-ws,o-wt on /sbin/audispd
-  file:
-    path: /sbin/audispd
-    mode: u-s,g-ws,o-wt
-  when: file_exists.stat is defined and file_exists.stat.exists
-  tags:
-  - CCE-86447-0
-  - configure_strategy
-  - file_permissions_audit_binaries
-  - low_complexity
-  - low_disruption
-  - medium_severity
-  - no_reboot_needed
-
 - name: Test for existence /sbin/augenrules
   stat:
     path: /sbin/augenrules

@jan-cerny jan-cerny self-assigned this Dec 18, 2024
Comment on lines 16 to 22
{{% if product not in ["rhel10"] %}}
/sbin/autrace 755
{{% endif %}}
/sbin/auditd 755
{{% if 'rhel' not in product %}}
/sbin/audispd 755
{{% endif %}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This causes weird vertical spaces in HTML guide. For example, a screenshot from the the RHEL 9 CIS profile guide:

image

You need to put - after % or before % to control newlines.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have adjusted these, should be better now.

Copy link

codeclimate bot commented Dec 18, 2024

Code Climate has analyzed commit e87f73c 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 61.6% (0.7% change).

View more on Code Climate.

@jan-cerny jan-cerny merged commit a41f77a into ComplianceAsCode:master Dec 19, 2024
103 of 105 checks passed
@Mab879 Mab879 deleted the fix_rhel10_audit_binaries branch December 19, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RHEL10 Red Hat Enterprise Linux 10 product related. Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants