From ef8314c84445c1e2bd3bd09dd63c6b522af77885 Mon Sep 17 00:00:00 2001 From: Omar Santos Date: Sun, 11 Apr 2021 20:22:14 -0400 Subject: [PATCH] Update run_cis_bench_locally.sh --- docker-and-k8s-security/docker/run_cis_bench_locally.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-and-k8s-security/docker/run_cis_bench_locally.sh b/docker-and-k8s-security/docker/run_cis_bench_locally.sh index 970893c..8726aa1 100644 --- a/docker-and-k8s-security/docker/run_cis_bench_locally.sh +++ b/docker-and-k8s-security/docker/run_cis_bench_locally.sh @@ -4,11 +4,13 @@ # Author: Omar Santos @santosomar # version 0.1 +#color settings red=$(tput setaf 1) green=$(tput setaf 2) reset=$(tput sgr0) clear +#welcome screen echo "${green} R U N C I S D O C K E R B E N C H M A R K ${reset} Author: Omar Ωr Santos @@ -19,21 +21,22 @@ ${red}This script will automatically install or upgrade InSpec and will run the " read -n 1 -s -r -p "Press any key to continue the setup..." +#installing InSpec echo "${green}Installing InSpec" echo "${reset}=========================" curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec - clear + +#running CIS Docker Benchmark directly from GitHub locally echo "${red}>> Running CIS Docker Benchmark ${reset}locally on $(hostname)" inspec exec https://github.com/dev-sec/cis-docker-benchmark > cis_benchmark_results.txt - - printf -- '\n'; echo "${red}REPORT SUMMARY:" tail -n 2 cis_benchmark_results.txt +#printing the results printf -- '\n'; echo "${reset}The complete results have been stored at: ${green}$(pwd)/cis_benchmark_results.txt " \ No newline at end of file