Skip to content

Conversation

@jan-cerny
Copy link
Collaborator

This commit introduces new rule group_server_with_gui_removed and adds it to CIS profile according to RHEL 10 CIS Benchmark v1.0.1, requirement 2.1.19. Although the requirement title suggests to remove only the GNOME Display Manager (gdm), the prose in the requirement instructs us to remove the whole Server with GUI dnf group. Also the remediation described in the CIS document wants us to remove the Server with GUI using the dnf groupremove command.

The problem with this rule is that we aren't able to write an OVAL check for it. The rpm probes can't provide any information about dnf groups as that is a concept that doesn't exist on rpm level and is known only for dnf tools. We don't have any dnf probe or dnf query in OpenSCAP. Therefore this rule will have only an SCE check.

Resolves: https://issues.redhat.com/browse/OPENSCAP-6081

This commit introduces new rule `group_server_with_gui_removed`
and adds it to CIS profile according to RHEL 10 CIS Benchmark
v1.0.1, requirement 2.1.19. Although the requirement title
suggests to remove only the GNOME Display Manager (gdm), the
prose in the requirement instructs us to remove the whole
`Server with GUI` dnf group. Also the remediation described
in the CIS document wants us to remove the `Server with GUI`
using the `dnf groupremove` command.

The problem with this rule is that we aren't able to write
an OVAL check for it. The rpm probes can't provide any information
about dnf groups as that is a concept that doesn't exist on
rpm level and is known only for dnf tools. We don't have any
dnf probe or dnf query in OpenSCAP. Therefore this rule will
have only an SCE check.

Resolves: https://issues.redhat.com/browse/OPENSCAP-6081
@jan-cerny jan-cerny added this to the 0.1.80 milestone Dec 2, 2025
@jan-cerny jan-cerny requested review from a team and matusmarhefka as code owners December 2, 2025 13:25
@jan-cerny jan-cerny added the New Rule Issues or pull requests related to new Rules. label Dec 2, 2025
@jan-cerny jan-cerny added CIS CIS Benchmark related. RHEL10 Red Hat Enterprise Linux 10 product related. SCE Related to Script Check Engine (SCE) checks labels Dec 2, 2025
@vojtapolasek vojtapolasek self-assigned this Dec 2, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the whole rule would fit better into the linux_os/guide/services/xwindows/disabling_xwindows group.

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.

Thank you for this rule, it looks mostly good. Please see comments for concerns.

cmd: dnf groupinstall -y 'Minimal Install'
- name: "{{{ rule_title }}} - Remove Server with GUI group"
ansible.builtin.command:
cmd: dnf groupremove -y 'Server with GUI'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add empty lines between tasks.

# with GUI group with minimal impact to the system functionality.
- name: "{{{ rule_title }}} - Install Minimal Install group"
ansible.builtin.command:
cmd: dnf groupinstall -y 'Minimal Install'
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is this going to work in "check mode"? Will it be OK? Would some tasks which would check actual presence / absence of a group make sense?

@openshift-ci
Copy link

openshift-ci bot commented Dec 4, 2025

@jan-cerny: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 1adc743 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@jan-cerny
Copy link
Collaborator Author

/packit build


- name: "{{{ rule_title }}} - Install Server group"
ansible.builtin.command:
cmd: dnf groupinstall -y 'Server'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't like this solution. It conflicts with our approach to install and remove all packages at the very beginning of the Ansible Playbook. Now, with this change, many packages are installed or removed somewhere in the middle of the Playbook. That not only makes the task longer, but probably causes the fails of the /hardening/host-os/ansible tests in Testing farm CI jobs. Please invent a different solution.

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. RHEL10 Red Hat Enterprise Linux 10 product related. SCE Related to Script Check Engine (SCE) checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants