Files
debian-cis/tests/hardening/ip6tables_outbound_established.sh
damien cavagnini 9f159985a4 feat: add trixie docker build
Ensure the current debian12 scripts are going to run on trixie
2025-09-03 14:38:04 +02:00

32 lines
891 B
Bash

# shellcheck shell=bash
# run-shellcheck
test_audit() {
describe Prepare test
apt install -y iptables
tests_is_ipv6_enabled
tests_get_debian_major_version
if [ "$CURRENT_IPV6_ENABLED" -eq 0 ] && [ "$DEB_MAJ_VER" -eq 12 ]; then
# not much to test here, unless working on a privileged container
describe Running on blank host
register_test retvalshouldbe 1
# shellcheck disable=2154
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
elif [ "$CURRENT_IPV6_ENABLED" -ne 0 ] && [ "$DEB_MAJ_VER" -eq 12 ]; then
# not much to test here, unless working on a privileged container
describe Running on blank host
register_test retvalshouldbe 0
# shellcheck disable=2154
run blank "${CIS_CHECKS_DIR}/${script}.sh" --audit-all
fi
describe clean test
apt remove -y iptables
}