From 97bb1927c3ce31bca23749bbbf2ab7c0cb815822 Mon Sep 17 00:00:00 2001 From: Thibault Ayanides Date: Tue, 27 Oct 2020 11:25:18 +0100 Subject: [PATCH] IMP(1.1.1.X): skip this tests on docker --- tests/hardening/1.1.1.1_disable_freevxfs.sh | 4 ++++ tests/hardening/1.1.1.2_disable_jffs2.sh | 4 ++++ tests/hardening/1.1.1.3_disable_hfs.sh | 4 ++++ tests/hardening/1.1.1.4_disable_hfsplus.sh | 4 ++++ tests/hardening/1.1.1.5_disable_udf.sh | 4 ++++ tests/hardening/1.1.1.6_disable_cramfs.sh | 4 ++++ tests/hardening/1.1.1.7_disable_squashfs.sh | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/tests/hardening/1.1.1.1_disable_freevxfs.sh b/tests/hardening/1.1.1.1_disable_freevxfs.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.1_disable_freevxfs.sh +++ b/tests/hardening/1.1.1.1_disable_freevxfs.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.2_disable_jffs2.sh b/tests/hardening/1.1.1.2_disable_jffs2.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.2_disable_jffs2.sh +++ b/tests/hardening/1.1.1.2_disable_jffs2.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.3_disable_hfs.sh b/tests/hardening/1.1.1.3_disable_hfs.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.3_disable_hfs.sh +++ b/tests/hardening/1.1.1.3_disable_hfs.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.4_disable_hfsplus.sh b/tests/hardening/1.1.1.4_disable_hfsplus.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.4_disable_hfsplus.sh +++ b/tests/hardening/1.1.1.4_disable_hfsplus.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.5_disable_udf.sh b/tests/hardening/1.1.1.5_disable_udf.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.5_disable_udf.sh +++ b/tests/hardening/1.1.1.5_disable_udf.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.6_disable_cramfs.sh b/tests/hardening/1.1.1.6_disable_cramfs.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.6_disable_cramfs.sh +++ b/tests/hardening/1.1.1.6_disable_cramfs.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi } diff --git a/tests/hardening/1.1.1.7_disable_squashfs.sh b/tests/hardening/1.1.1.7_disable_squashfs.sh index b333419..180f73f 100644 --- a/tests/hardening/1.1.1.7_disable_squashfs.sh +++ b/tests/hardening/1.1.1.7_disable_squashfs.sh @@ -1,5 +1,8 @@ # run-shellcheck test_audit() { + if [ -f "/.dockerenv" ]; then + skip "SKIPPED on docker" + else describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test @@ -7,4 +10,5 @@ test_audit() { run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all # TODO fill comprehensive tests + fi }