Sanity/machine-hardening: move the sshd waiver before 'unknown' check

This commit is contained in:
Milan Lysonek 2023-08-29 10:57:48 +02:00
commit 90044c399b

View file

@ -106,11 +106,11 @@ rlJournalStart
rlRun "sed -i '/Function pcre_exec() failed to match a regular expression with return code -10/d' $rlRun_LOG" 0 "Remove known problem caused by non-utf8 character in CentOS image logs"
rlRun "sed -i '/xccdf_org.ssgproject.content_rule_bios_enable_execution_restrictions:error/d' $rlRun_LOG" 0 "Remove erroring rule caused by failed regular expression"
rlRun "sed -i '/xccdf_org.ssgproject.content_rule_sshd_use_strong_macs/d' $rlRun_LOG" 0 "Waiving because of https://github.com/ComplianceAsCode/content/issues/11018"
rlAssertNotGrep ":error$" "$rlRun_LOG" -i
rlAssertNotGrep ":unknown$" "$rlRun_LOG" -i
if rlIsRHEL 7; then
rlRun "sed -i '/E: probe_file: Failed to check available memory/d' $rlRun_LOG" 0 "Waiving because of https://github.com/OpenSCAP/openscap/issues/1867"
rlRun "sed -i '/xccdf_org.ssgproject.content_rule_sshd_use_strong_macs/d' $rlRun_LOG" 0 "Waiving because of https://github.com/ComplianceAsCode/content/issues/11018"
rlRun "sed -i '/xccdf_org.ssgproject.content_value_sshd_strong_macs/d' $rlRun_LOG" 0 "Waiving because of https://github.com/ComplianceAsCode/content/issues/11018"
fi
rlAssertNotGrep "(^E:|^openscap error:)" "$rlRun_LOG" -iE