Skip to content

CIS: implement controls so that "remember" is not used together with pam_unix#14202

Merged
Mab879 merged 5 commits intoComplianceAsCode:masterfrom
vojtapolasek:rhel10_cis_pam_no_remember
Dec 3, 2025
Merged

CIS: implement controls so that "remember" is not used together with pam_unix#14202
Mab879 merged 5 commits intoComplianceAsCode:masterfrom
vojtapolasek:rhel10_cis_pam_no_remember

Conversation

@vojtapolasek
Copy link
Collaborator

Description:

Extends the accounts_password_pam_unix_no_remember rule to support RHEL-based systems (RHEL 8, 9, 10, Fedora, Oracle Linux, AlmaLinux) in addition to the existing Ubuntu/Debian support. This also implements appropriate CIS control for RHEL 8, 9, and 10.

Key changes:

  • Updated rule.yml with platform-specific descriptions, CCE identifiers, authselect warnings, and OCIL manual verification instructions
  • Modified OVAL check to handle platform-specific PAM file paths (RHEL: /etc/pam.d/{system,password}-auth, Debian: /etc/pam.d/common-*)
  • Enhanced Bash remediation with authselect-aware implementation for RHEL systems and fallback for legacy systems
  • Created new Ansible remediation for multi-platform support
  • Added 4 comprehensive test scenarios for RHEL systems covering both PAM files and edge cases
  • Updated CIS control files for RHEL 8, 9, and 10 from "pending" to "automated" status

Rationale:

The remember option in pam_unix.so uses the deprecated MD5 password hashing algorithm, which is less secure than modern alternatives. The CIS Benchmark recommends removing this option and using the pam_pwhistory module instead, which supports stronger hashing algorithms like yescrypt or SHA512.

This rule was previously only implemented for Ubuntu/Debian systems.

Review Hints:

  • build for rhel / nonrhel products and examine if JInja macros are applied correctly
  • run Automatus tests

@vojtapolasek vojtapolasek added this to the 0.1.80 milestone Dec 2, 2025
@vojtapolasek vojtapolasek added RHEL9 Red Hat Enterprise Linux 9 product related. Update Rule Issues or pull requests related to Rules updates. Update Profile Issues or pull requests related to Profiles updates. RHEL8 Red Hat Enterprise Linux 8 product related. CIS CIS Benchmark related. RHEL10 Red Hat Enterprise Linux 10 product related. labels Dec 2, 2025
@vojtapolasek vojtapolasek force-pushed the rhel10_cis_pam_no_remember branch from 1204bd9 to 448fde4 Compare December 2, 2025 13:22
@vojtapolasek vojtapolasek force-pushed the rhel10_cis_pam_no_remember branch from 448fde4 to 08c89dc Compare December 3, 2025 13:10
@openshift-ci
Copy link

openshift-ci bot commented Dec 3, 2025

@vojtapolasek: The following tests 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 08c89dc link true /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance 08c89dc link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

Details

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.

@Mab879 Mab879 self-assigned this Dec 3, 2025
@Mab879 Mab879 merged commit 7155a0f into ComplianceAsCode:master Dec 3, 2025
132 of 140 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. RHEL8 Red Hat Enterprise Linux 8 product related. RHEL9 Red Hat Enterprise Linux 9 product related. RHEL10 Red Hat Enterprise Linux 10 product related. Update Profile Issues or pull requests related to Profiles updates. 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