mirror of
https://github.com/ovh/debian-cis.git
synced 2025-08-04 14:21:15 +02:00
feat: add debian12 scripts
- aide_daliy_check -> 6.1.2 - journald_is_enabled.sh -> 6.2.1.1.1 - systemd_journald_remote_is_installed.sh -> 6.2.1.2.1 - systemd_journal_upload_is_enabled.sh - -> 6.2.1.2.3 - systemd_journal_remote_is_disabled.sh -> 6.2.1.2.4
This commit is contained in:
10
tests/hardening/aide_daily_check.sh
Normal file
10
tests/hardening/aide_daily_check.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
# shellcheck shell=bash
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
# running on a container, not much to test here
|
||||
describe Running on blank host
|
||||
register_test retvalshouldbe 1
|
||||
# shellcheck disable=2154
|
||||
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
}
|
11
tests/hardening/journald_is_enabled.sh
Normal file
11
tests/hardening/journald_is_enabled.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# shellcheck shell=bash
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
|
||||
# not much to test here, we are running in a container, we wont check service state
|
||||
describe Checking blank host
|
||||
register_test retvalshouldbe 1
|
||||
# shellcheck disable=2154
|
||||
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
}
|
11
tests/hardening/systemd_journal_remote_is_disabled.sh
Normal file
11
tests/hardening/systemd_journal_remote_is_disabled.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# shellcheck shell=bash
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
|
||||
# not much to test here, we are running in a container, we wont check service state
|
||||
describe Checking blank host
|
||||
register_test retvalshouldbe 0
|
||||
# shellcheck disable=2154
|
||||
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
}
|
23
tests/hardening/systemd_journal_remote_is_installed.sh
Normal file
23
tests/hardening/systemd_journal_remote_is_installed.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
# shellcheck shell=bash
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
describe set up failed check
|
||||
apt remove -y systemd-journal-remote
|
||||
|
||||
describe Running failed test
|
||||
register_test retvalshouldbe 1
|
||||
# shellcheck disable=2154
|
||||
run failure "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
describe Fix situation
|
||||
sed -i 's/audit/enabled/' "${CIS_CONF_DIR}/conf.d/${script}.cfg"
|
||||
"${CIS_CHECKS_DIR}/${script}.sh" --apply || true
|
||||
|
||||
describe running successfull audit
|
||||
register_test retvalshouldbe 0
|
||||
# shellcheck disable=2154
|
||||
run success "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
apt remove -y systemd-journal-remote
|
||||
apt autoremove -y
|
||||
}
|
11
tests/hardening/systemd_journal_upload_is_enabled.sh
Normal file
11
tests/hardening/systemd_journal_upload_is_enabled.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# shellcheck shell=bash
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
|
||||
# not much to test here, we are running in a container, we wont check service state
|
||||
describe Checking blank host
|
||||
register_test retvalshouldbe 1
|
||||
# shellcheck disable=2154
|
||||
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
|
||||
|
||||
}
|
Reference in New Issue
Block a user