Skip to content

SLE16 sudo rules transactional related patches - #15131

Open
teacup-on-rockingchair wants to merge 3 commits into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:suse16_sudo_rules
Open

teacup-on-rockingchair wants to merge 3 commits into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:suse16_sudo_rules

Conversation

@teacup-on-rockingchair

Copy link
Copy Markdown
Contributor

Description:

  • Make sudo related rules compatible with transactional based sle/slmicro platforms

Rationale:

  • Make sure distro default config is used as basis for configuration and oval, bash and ansible
    take this into account

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 20, 2026
@openshift-ci

openshift-ci Bot commented Sep 20, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@teacup-on-rockingchair teacup-on-rockingchair added this to the 0.1.83 milestone Sep 20, 2026
@teacup-on-rockingchair teacup-on-rockingchair added Ansible Ansible remediation update. Test Suite Update in Test Suite. OVAL OVAL update. Related to the systems assessments. Bash Bash remediation update. labels Sep 20, 2026
@teacup-on-rockingchair
teacup-on-rockingchair marked this pull request as ready for review September 20, 2026 16:02
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical OVAL coverage gaps and moderate test-platform issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 High severity · 2 Medium severity

Open (6)
What changed in this PR

Adapts sudo rules for transactional SLE16/SLMicro platforms using distro-default configuration across OVAL, Bash, Ansible, and tests.

Changes:

  • Adds transactional remediation and validation handling.
  • Expands sudo tests, package metadata, drop-in coverage, and openSUSE scenarios.
File Final review status
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_targetpw.fail.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_runaspw.fail.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd.pass.sh Moderate (2 votes): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd.fail.sh Moderate (3 votes): opensuse-16 is not a product value. Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd_multiple_files.pass.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd_duplicates.pass.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd_duplicates.fail.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_validate_passwd_conflicting_values.fail.sh Moderate (1 vote): SLE16 is missing from the platform marker.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​tests/​sudoers_d_duplicate.pass.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​oval/​shared.xml Critical (1 vote): Active /usr/etc/sudoers.d drop-ins can be missed.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​bash/​shared.sh Moderate (1 vote): The openSUSE transactional guard is missing.
linux_os/​guide/​system/​software/​sudo/​sudoers_validate_passwd/​ansible/​shared.yml No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_restrict_privilege_elevation_to_authorized/​oval/​shared.xml Critical (2 votes): /usr/etc/sudoers.d is not scanned.
linux_os/​guide/​system/​software/​sudo/​sudo_require_authentication/​tests/​wrong_value.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_require_authentication/​tests/​correct_value.pass.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​tests/​wrong_value.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​tests/​wrong_value_specific_commands.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​tests/​wrong_value_include_dir.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​tests/​correct_value.pass.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​oval/​shared.xml Critical (1 vote): Active /usr/etc/sudoers.d drop-ins can be missed.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​bash/​shared.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_nopasswd/​ansible/​shared.yml No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​tests/​wrong_value.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​tests/​wrong_value_include_dir.fail.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​tests/​correct_value.pass.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​oval/​shared.xml Critical (1 vote): Active /usr/etc/sudoers.d drop-ins can be missed.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​bash/​shared.sh No final comment.
linux_os/​guide/​system/​software/​sudo/​sudo_remove_no_authenticate/​ansible/​shared.yml No final comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…ro platforms

Make sure distro default config is used as basis for configuration and oval, bash and ansible
take this into account
@teacup-on-rockingchair teacup-on-rockingchair added the SLES SUSE Linux Enterprise Server product related. label Sep 21, 2026
@macko1
macko1 self-requested a review September 21, 2026 15:47
@macko1 macko1 self-assigned this Sep 21, 2026
@macko1

macko1 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Hi @teacup-on-rockingchair, thanks for the submission.

Please submit the test scenarios (e.g. automatus), the test results, and verbose documentation for the remediations before marking this as ready. It will help with the review a lot. (Use the PR template)

Thanks! 🙏

@macko1 macko1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See previous comment

@@ -1,4 +1,5 @@
#!/bin/bash
# packages = sudo

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What was the reason for this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The motivation is that the /etc/sudoers file is owned and therefore depends on sudo package

@@ -1,8 +1,3 @@
#!/bin/bash

# packages = sudo

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What was the reason for this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The motivation is that the /etc/sudoers file is owned and therefore depends on sudo package

@macko1

macko1 commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@svet-se Please take a look at the suse side of the PR, thank you

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ansible Ansible remediation update. Bash Bash remediation update. OVAL OVAL update. Related to the systems assessments. SLES SUSE Linux Enterprise Server product related. Test Suite Update in Test Suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants