mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Log the remediation measure in JSON file only if the -p flag is not set
This commit is contained in:
parent
cc8171fbfe
commit
68cb493117
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ logcheckresult() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Log remediation measure to JSON
|
# 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
|
printf ", \"remediation\": \"%s\"" "$remediation" | tee -a "$logger.json" 2>/dev/null 1>&2
|
||||||
if [ -n "$remediationImpact" ]; then
|
if [ -n "$remediationImpact" ]; then
|
||||||
printf ", \"remediation-impact\": \"%s\"" "$remediationImpact" | tee -a "$logger.json" 2>/dev/null 1>&2
|
printf ", \"remediation-impact\": \"%s\"" "$remediationImpact" | tee -a "$logger.json" 2>/dev/null 1>&2
|
||||||
|
|
Loading…
Reference in a new issue