IMP(1.1.21): skip on docker

This commit is contained in:
Thibault Ayanides 2020-10-27 15:34:32 +01:00
parent 4680465095
commit 5d16ee5c98

View File

@ -5,7 +5,9 @@ test_audit() {
register_test contain "All world writable directories have a sticky bit" register_test contain "All world writable directories have a sticky bit"
# shellcheck disable=2154 # shellcheck disable=2154
run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
if [ -f "/.dockerenv" ]; then
skip "SKIPPED on docker"
else
describe Tests purposely failing describe Tests purposely failing
local targetdir="/home/secaudit/world_writable_folder" local targetdir="/home/secaudit/world_writable_folder"
mkdir $targetdir || true mkdir $targetdir || true
@ -22,4 +24,5 @@ test_audit() {
register_test retvalshouldbe 0 register_test retvalshouldbe 0
register_test contain "All world writable directories have a sticky bit" register_test contain "All world writable directories have a sticky bit"
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
fi
} }