diff --git a/functions/output_lib.sh b/functions/output_lib.sh index f893cb5..6fd1ce7 100644 --- a/functions/output_lib.sh +++ b/functions/output_lib.sh @@ -163,7 +163,7 @@ logcheckresult() { fi # Log remediation measure to JSON - if [ -n "$remediation" ] && [ "$1" != "PASS" ]; then + if [ -n "$remediation" ] && [ "$1" != "PASS" ] && [ "$printremediation" = "1" ]; then printf ", \"remediation\": \"%s\"" "$remediation" | tee -a "$logger.json" 2>/dev/null 1>&2 if [ -n "$remediationImpact" ]; then printf ", \"remediation-impact\": \"%s\"" "$remediationImpact" | tee -a "$logger.json" 2>/dev/null 1>&2