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

Adapt audit_rules_suid_privilege_function for Ubuntu 24.04 CIS #12974

Merged

Conversation

mpurg
Copy link
Contributor

@mpurg mpurg commented Feb 5, 2025

Description:

  • Omit checking for '-F euid=0' in rule audit_rules_suid_privilege_function on Ubuntu 24.04

Rationale:

  • Satisfies Ubuntu 24.04 CIS control 6.2.3.2 which recommends that all actions as another user are logged and not only when euid=0

Tests:

Ubuntu 24.04 in KVM:

WARNING - Script wrong_f_egid.fail.sh is not applicable on given platform
WARNING - Script wrong_f_euid.fail.sh is not applicable on given platform
INFO - xccdf_org.ssgproject.content_rule_audit_rules_suid_privilege_function
INFO - Script wrong_c_euid.fail.sh using profile (all) OK
INFO - Script wrong_c_egid.fail.sh using profile (all) OK
INFO - Script other_key.pass.sh using profile (all) OK
INFO - Script correct_value.pass.sh using profile (all) OK
INFO - Script wrong_a.fail.sh using profile (all) OK
INFO - Script use_f_key.pass.sh using profile (all) OK
INFO - Script no_rules.fail.sh using profile (all) OK
INFO - Script miss_arch.fail.sh using profile (all) OK
INFO - Script miss_c.fail.sh using profile (all) OK

Copy link

openshift-ci bot commented Feb 5, 2025

Hi @mpurg. 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-sigs/prow repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

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

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_audit_rules_suid_privilege_function' differs.
--- xccdf_org.ssgproject.content_rule_audit_rules_suid_privilege_function
+++ xccdf_org.ssgproject.content_rule_audit_rules_suid_privilege_function
@@ -8,7 +8,7 @@
 for ARCH in "${RULE_ARCHS[@]}"
 do
 	ACTION_ARCH_FILTERS="-a always,exit -F arch=$ARCH"
-	
+    
 	OTHER_FILTERS="-C uid!=euid -F euid=0"
 	
 	AUID_FILTERS=""
@@ -326,7 +326,7 @@
 for ARCH in "${RULE_ARCHS[@]}"
 do
 	ACTION_ARCH_FILTERS="-a always,exit -F arch=$ARCH"
-	
+    
 	OTHER_FILTERS="-C gid!=egid -F egid=0"
 	
 	AUID_FILTERS=""

@dodys dodys requested a review from a team February 5, 2025 08:24
@dodys dodys self-assigned this Feb 5, 2025
@dodys dodys added Ubuntu Ubuntu product related. Update Rule Issues or pull requests related to Rules updates. CIS CIS Benchmark related. labels Feb 5, 2025
@dodys dodys added this to the 0.1.77 milestone Feb 5, 2025
@dodys
Copy link
Contributor

dodys commented Feb 5, 2025

/packit build

1 similar comment
@dodys
Copy link
Contributor

dodys commented Feb 5, 2025

/packit build

Ubuntu 24.04 CIS control 6.2.3.2 recommends that all actions
as another user are logged and not only when euid=0.
@mpurg mpurg force-pushed the ubuntu2404_cis_6.2.3.2 branch from 3cea943 to 93dbe3b Compare February 5, 2025 10:07
@dodys dodys modified the milestones: 0.1.77, 0.1.76 Feb 5, 2025
Copy link
Contributor

@dodys dodys left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@dodys dodys merged commit 966c6ed into ComplianceAsCode:stabilization-v0.1.76 Feb 6, 2025
128 of 135 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CIS CIS Benchmark related. needs-ok-to-test Used by openshift-ci bot. Ubuntu Ubuntu 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