From b3a36e8d94cecce0f462ed4096984e66c4db6ed9 Mon Sep 17 00:00:00 2001 From: Razvan Stoica Date: Thu, 11 Mar 2021 09:26:31 +0200 Subject: [PATCH] Print Section B only if it contains remediation measures --- docker-bench-security.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-bench-security.sh b/docker-bench-security.sh index f8849ba..d7b519b 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -196,8 +196,10 @@ main () { fi done - logit "\n\n${bldylw}Section B - Remediation measures${txtrst}" - logit "${globalRemediation}" + if [ -n "${globalRemediation}" ]; then + logit "\n\n${bldylw}Section B - Remediation measures${txtrst}" + logit "${globalRemediation}" + fi logit "\n\n${bldylw}Section C - Score${txtrst}\n" info "Checks: $totalChecks"