-
Notifications
You must be signed in to change notification settings - Fork 685
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
Ubuntu 22.04 CIS #9953
Ubuntu 22.04 CIS #9953
Conversation
This datastream diff is auto generated by the check Click here to see the full diffbash remediation for rule 'xccdf_org.ssgproject.content_rule_account_passwords_pam_faillock_audit' differs.
--- xccdf_org.ssgproject.content_rule_account_passwords_pam_faillock_audit
+++ xccdf_org.ssgproject.content_rule_account_passwords_pam_faillock_audit
@@ -12,7 +12,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -22,8 +23,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*audit"
@@ -33,7 +35,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -75,6 +78,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_audit
@@ -12,7 +12,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -22,8 +23,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*audit"
@@ -33,7 +35,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -75,6 +78,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
New content has different text for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny'.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny
@@ -7,7 +7,9 @@
using pam_faillock.so.
pam_faillock.so module requires multiple entries in pam files. These entries must be carefully
-defined to work as expected. In order to avoid errors when manually editing these files, it is
+defined to work as expected.
+
+In order to avoid errors when manually editing these files, it is
recommended to use the appropriate tools, such as authselect or authconfig,
depending on the OS version.
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny
@@ -17,7 +17,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -27,8 +28,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*deny\s*="
@@ -40,7 +42,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -82,6 +85,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny_root' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny_root
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_deny_root
@@ -14,7 +14,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -24,8 +25,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*even_deny_root"
@@ -35,7 +37,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -77,6 +80,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_dir' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_dir
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_dir
@@ -17,7 +17,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -27,8 +28,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*dir\s*="
@@ -40,7 +42,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -82,6 +85,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_enforce_local' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_enforce_local
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_enforce_local
@@ -14,7 +14,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -24,8 +25,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*local_users_only"
@@ -35,7 +37,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -77,6 +80,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_interval' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_interval
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_interval
@@ -17,7 +17,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -27,8 +28,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*fail_interval\s*="
@@ -40,7 +42,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -82,6 +85,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}"
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_unlock_time' differs.
--- xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_unlock_time
+++ xccdf_org.ssgproject.content_rule_accounts_passwords_pam_faillock_unlock_time
@@ -17,7 +17,8 @@
authselect apply-changes -b
else
- AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
for pam_file in "${AUTH_FILES[@]}"
do
if ! grep -qE '^\s*auth\s+required\s+pam_faillock\.so\s+(preauth silent|authfail).*$' "$pam_file" ; then
@@ -27,8 +28,9 @@
fi
sed -Ei 's/(auth.*)(\[default=die\])(.*pam_faillock\.so)/\1required \3/g' "$pam_file"
done
+
fi
-AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth")
+AUTH_FILES=("/etc/pam.d/system-auth" "/etc/pam.d/password-auth" "/etc/pam.d/common-auth")
FAILLOCK_CONF="/etc/security/faillock.conf"
if [ -f $FAILLOCK_CONF ]; then
regex="^\s*unlock_time\s*="
@@ -40,7 +42,8 @@
fi
for pam_file in "${AUTH_FILES[@]}"
do
- if [ -e "$pam_file" ] ; then
+ if [ -f $pam_file ]; then
+ if [ -e "$pam_file" ] ; then
PAM_FILE_PATH="$pam_file"
if [ -f /usr/bin/authselect ]; then
if ! authselect check; then
@@ -82,6 +85,7 @@
else
echo "$pam_file was not found" >&2
fi
+ fi
done
else
for pam_file in "${AUTH_FILES[@]}" |
/retest |
This is an automated commit; to redo run: ./utils/rule_dir_json.py ./utils/autoprodtyper.py ubuntu2204 cis_level1_server
This is an automated commit; to redo run: ./utils/rule_dir_json.py ./utils/autoprodtyper.py ubuntu2204 cis_level2_server
platform_package_overrides
Code Climate has analyzed commit 949a6f1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 48.8% (0.0% change). View more on Code Climate. |
@dodys: 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/test-infra 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.
Thanks for the new profile! Since you are the only approver for Ubuntu products, I will handle the approval of this PR.
I have run some local tests for failing Automatus tests, and they pass. |
thanks @Mab879! |
Description: