mirror of
https://github.com/ovh/debian-cis.git
synced 2025-07-15 05:12:17 +02:00
chore: drop debian 10 and below support (#264)
Currently, the only LTS Debian are 11 and 12 We only support CIS for LTS debian Co-authored-by: Damien Cavagnini <damien.cavagnini@corp.ovh.com>
This commit is contained in:
@ -36,35 +36,4 @@ test_audit() {
|
||||
register_test contain "is present in /etc/login.defs"
|
||||
run sha512pass "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
# DEB_MAJ_VER cannot be overwritten here;
|
||||
# therefore we need to trick get_debian_major_version
|
||||
ORIGINAL_DEB_VER="$(cat /etc/debian_version)"
|
||||
echo "sid" >/etc/debian_version
|
||||
|
||||
describe Running on blank host as sid
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "(SHA512|yescrypt|YESCRYPT)"
|
||||
# shellcheck disable=2154
|
||||
run blanksid "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
cp /etc/login.defs /tmp/login.defs.bak
|
||||
sed -ir 's/ENCRYPT_METHOD[[:space:]]\+.*/ENCRYPT_METHOD MD5/' /etc/login.defs
|
||||
|
||||
describe Fail: wrong hash function configuration as sid
|
||||
register_test retvalshouldbe 1
|
||||
register_test contain "(SHA512|yescrypt|YESCRYPT)"
|
||||
run wrongconfsid "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
describe Correcting situation as sid
|
||||
sed -i 's/audit/enabled/' "${CIS_CONF_DIR}/conf.d/${script}.cfg"
|
||||
"${CIS_CHECKS_DIR}/${script}.sh" || true
|
||||
|
||||
describe Checking resolved state as sid
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "(SHA512|yescrypt|YESCRYPT)"
|
||||
run sha512passsid "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
# Cleanup
|
||||
echo -n "$ORIGINAL_DEB_VER" >/etc/debian_version
|
||||
unset ORIGINAL_DEB_VER
|
||||
}
|
||||
|
Reference in New Issue
Block a user