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

RHEL now checks no other users have primary group ID 0 #12891

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Jan 23, 2025

Description:

RHEL now checks no other users have primary group ID 0
Also make the test only work on RHEL and Ubuntu since those are the only platforms that have the OVAL test.

Rationale:

Fixes #12874

@Mab879 Mab879 added the bugfix Fixes to reported bugs. label Jan 23, 2025
@Mab879 Mab879 added this to the 0.1.76 milestone Jan 23, 2025
Copy link

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

Click here to see the full diff
OVAL for rule 'xccdf_org.ssgproject.content_rule_accounts_root_gid_zero' differs.
--- oval:ssg-accounts_root_gid_zero:def:1
+++ oval:ssg-accounts_root_gid_zero:def:1
@@ -1,2 +1,3 @@
 criteria AND
 criterion oval:ssg-test_accounts_root_gid_zero:tst:1
+criterion oval:ssg-test_accounts_root_gid_zero_no_other_gid_0:tst:1

Copy link

codeclimate bot commented Jan 23, 2025

Code Climate has analyzed commit 68d4c9e 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.9% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny self-assigned this Jan 24, 2025
Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

I confirm this PR fixes the failing test other_user_uid_0.fail.sh on RHEL 9.

jcerny@fedora:~/work/git/scap-security-guide (pr/12891)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 accounts_root_gid_zero
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-01-24-1005/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_accounts_root_gid_zero
INFO - Script correct_value.pass.sh using profile (all) OK
INFO - Script other_user_uid_0.fail.sh using profile (all) OK
jcerny@fedora:~/work/git/scap-security-guide (pr/12891)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 --remediate-using ansible accounts_root_gid_zero
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-01-24-1007/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_accounts_root_gid_zero
INFO - Script correct_value.pass.sh using profile (all) OK
INFO - Script other_user_uid_0.fail.sh using profile (all) OK

@jan-cerny jan-cerny merged commit fec1590 into ComplianceAsCode:master Jan 24, 2025
108 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes to reported bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test scenario other_user_uid_0.fail for accounts_root_gid_zero fails
2 participants