Fix pam_pwquality bash remediation for Debian products#14771
Conversation
Two related fixes: 1. accounts_password/bash.template: remove debian13 from the ubuntu2404 guard that calls bash_pam_pwquality_enable() for parameter rules. This was introduced by commit 86030e2 (add debian13 support for rule package_pam_pwquality_installed) which incorrectly copied the ubuntu2404 approach. debian12 was not affected; its support was added correctly without this guard (commit e6f0f0d). 2. accounts_password_pam_pwquality_enabled/bash/shared.sh: extend the SLE condition to all Debian products so that bash_ensure_pam_module_configuration is used (direct PAM file edit) instead of bash_pam_pwquality_enable(). The latter creates a pam-auth-update config with Conflicts: pwquality that removes the active pam_pwquality.so entry from /etc/pam.d/common-password, causing all downstream accounts_password_pam_* OVAL checks to fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi @israel-villar. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
This datastream diff is auto generated by the check Click here to see the full diffNew data stream adds bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_pwquality_enabled'. |
Two related fixes:
accounts_password/bash.template: remove debian13 from the ubuntu2404 guard that calls bash_pam_pwquality_enable() for parameter rules. This was introduced by commit 86030e2 (add debian13 support for rule package_pam_pwquality_installed) which incorrectly copied the ubuntu2404 approach. debian12 was not affected; its support was added correctly without this guard (commit e6f0f0d).
accounts_password_pam_pwquality_enabled/bash/shared.sh: extend the SLE condition to all Debian products so that bash_ensure_pam_module_configuration is used (direct PAM file edit) instead of bash_pam_pwquality_enable(). The latter creates a pam-auth-update config with Conflicts: pwquality that removes the active pam_pwquality.so entry from /etc/pam.d/common-password, causing all downstream accounts_password_pam_* OVAL checks to fail.
Description:
accounts_password_pam_pwquality_enabled/bash/shared.sh: extend theplatform line to
multi_platform_debianand usebash_ensure_pam_module_configuration(direct PAM file edit) insteadof
bash_pam_pwquality_enable()for all Debian products.shared/templates/accounts_password/bash.template: removedebian13from the
ubuntu2404guard that callsbash_pam_pwquality_enable()for password parameter rules.
Rationale:
bash_pam_pwquality_enable()creates a pam-auth-update config withConflicts: pwqualityand callspam-auth-update, which removes theactive
pam_pwquality.soentry from/etc/pam.d/common-password.This causes all downstream
accounts_password_pam_*OVAL checks to fail.debian13entry in thebash.templateguard was introduced bycommit 86030e2 alongside
package_pam_pwquality_installedsupport.debian12 was not affected — its support was added correctly without
this guard (commit e6f0f0d).
Review Hints:
first installs
libpam-pwquality, the second configures the parameters(OpenSCAP CPE session limitation, not a content bug).
accounts_password_pam_*rules should pass.