-
Notifications
You must be signed in to change notification settings - Fork 761
Create rule group_server_with_gui_removed #14204
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
base: master
Are you sure you want to change the base?
Create rule group_server_with_gui_removed #14204
Conversation
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: The following test failed, say
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. |
There was a problem hiding this comment.
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.
vojtapolasek
left a comment
There was a problem hiding this 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' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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?
This commit introduces new rule
group_server_with_gui_removedand 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 wholeServer with GUIdnf group. Also the remediation described in the CIS document wants us to remove theServer with GUIusing thednf groupremovecommand.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