Fix pam_pwquality bash remediation for Debian products#14771
Open
israel-villar wants to merge 1 commit into
Open
Fix pam_pwquality bash remediation for Debian products#14771israel-villar wants to merge 1 commit into
israel-villar wants to merge 1 commit into
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.