mirror of
https://github.com/ovh/debian-cis.git
synced 2025-08-10 17:41:54 +02:00

* adding new scripts for debian12 - "users_homedir_is_configured.sh" is a concatenation of different existing scripts: - [users_homedir_exist.sh](https://github.com/ovh/debian-cis/blob/master/bin/hardening/users_homedir_exist.sh) - [users_homedir_ownership.sh](https://github.com/ovh/debian-cis/blob/master/bin/hardening/users_homedir_ownership.sh) - [check_user_dir_perm.sh](https://github.com/ovh/debian-cis/blob/master/bin/hardening/check_user_dir_perm.sh) And so is its test It will be mapped as 7.2.9 for debian 12 - The following scripts are a split from [5.3.1_enable_pwquality.sh](https://github.com/ovh/debian-cis/blob/master/bin/hardening/enable_pwquality.sh): - enable_libpam_pwquality.sh -> will be mapped as 5.3.2.3 - install_libpam_pwquality.sh -> will be mapped as 5.3.1.3 - password_complexity.sh -> will be mapped as 5.3.3.2.3 - password_min_length.sh -> will be mapped as 5.3.3.2.2 The others are scripts are new. They will be mapped as follow for debian 12 CIS : - apt_gpg_is_configured.sh -> 1.2.1.1 - dev_shm_separate_partition.sh -> 1.2.2.1 - install_iptables.sh -> 4.3.1.1 - install_nftables.sh -> 4.2.1 - password_consecutive_characters.sh -> 5.3.3.2.4 - password_max_sequential_characters.sh -> 5.3.3.2.5 * chore: rename some scripts - password configuration related scripts : ensure they start as "password_" like others checks --------- Co-authored-by: Damien Cavagnini <damien.cavagnini@corp.ovh.com>
25 lines
659 B
Bash
25 lines
659 B
Bash
# shellcheck shell=bash
|
|
# run-shellcheck
|
|
test_audit() {
|
|
describe prepare test
|
|
apt remove nftables -y
|
|
|
|
describe Running failed test
|
|
register_test retvalshouldbe 1
|
|
# shellcheck disable=2154
|
|
run failed "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
|
|
|
describe correcting situation
|
|
sed -i 's/audit/enabled/' "${CIS_CONF_DIR}/conf.d/${script}.cfg"
|
|
"${CIS_CHECKS_DIR}/${script}.sh" --apply || true
|
|
|
|
describe Running resolved
|
|
register_test retvalshouldbe 0
|
|
# shellcheck disable=2154
|
|
run resolved "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
|
|
|
describe clean test
|
|
apt remove nftables -y
|
|
apt autoremove -y
|
|
}
|