mirror of
https://github.com/The-Art-of-Hacking/h4cker.git
synced 2024-12-18 19:06:08 +00:00
Update run_cis_bench_locally.sh
This commit is contained in:
parent
d05137ad45
commit
ef8314c844
@ -4,11 +4,13 @@
|
|||||||
# Author: Omar Santos @santosomar
|
# Author: Omar Santos @santosomar
|
||||||
# version 0.1
|
# version 0.1
|
||||||
|
|
||||||
|
#color settings
|
||||||
red=$(tput setaf 1)
|
red=$(tput setaf 1)
|
||||||
green=$(tput setaf 2)
|
green=$(tput setaf 2)
|
||||||
reset=$(tput sgr0)
|
reset=$(tput sgr0)
|
||||||
clear
|
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
|
echo "${green} R U N C I S D O C K E R B E N C H M A R K
|
||||||
${reset}
|
${reset}
|
||||||
Author: Omar Ωr Santos
|
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..."
|
read -n 1 -s -r -p "Press any key to continue the setup..."
|
||||||
|
|
||||||
|
#installing InSpec
|
||||||
echo "${green}Installing InSpec"
|
echo "${green}Installing InSpec"
|
||||||
echo "${reset}========================="
|
echo "${reset}========================="
|
||||||
|
|
||||||
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
|
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
#running CIS Docker Benchmark directly from GitHub locally
|
||||||
echo "${red}>> Running CIS Docker Benchmark ${reset}locally on $(hostname)"
|
echo "${red}>> Running CIS Docker Benchmark ${reset}locally on $(hostname)"
|
||||||
inspec exec https://github.com/dev-sec/cis-docker-benchmark > cis_benchmark_results.txt
|
inspec exec https://github.com/dev-sec/cis-docker-benchmark > cis_benchmark_results.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf -- '\n';
|
printf -- '\n';
|
||||||
echo "${red}REPORT SUMMARY:"
|
echo "${red}REPORT SUMMARY:"
|
||||||
tail -n 2 cis_benchmark_results.txt
|
tail -n 2 cis_benchmark_results.txt
|
||||||
|
|
||||||
|
#printing the results
|
||||||
printf -- '\n';
|
printf -- '\n';
|
||||||
echo "${reset}The complete results have been stored at:
|
echo "${reset}The complete results have been stored at:
|
||||||
${green}$(pwd)/cis_benchmark_results.txt "
|
${green}$(pwd)/cis_benchmark_results.txt "
|
Loading…
Reference in New Issue
Block a user