mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-07-25 20:27:49 +00:00
Overwrite the json log at each run. Beautify the json log.
This commit is contained in:
parent
8a934aebf1
commit
86985f854f
2 changed files with 44 additions and 58 deletions
|
@ -78,6 +78,14 @@ Released under the Apache-2.0 License.
|
|||
EOF
|
||||
}
|
||||
|
||||
# Default values
|
||||
if [ ! -d log ]; then
|
||||
mkdir log
|
||||
fi
|
||||
logger="log/${myname}.log"
|
||||
limit=0
|
||||
printremediation="1"
|
||||
|
||||
# Get the flags
|
||||
# If you add an option here, please
|
||||
# remember to update usage() above.
|
||||
|
@ -98,22 +106,6 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
# Default values
|
||||
if [ -z "$logger" ]; then
|
||||
if [ ! -d log ]; then
|
||||
mkdir log
|
||||
fi
|
||||
logger="log/${myname}.log"
|
||||
fi
|
||||
|
||||
if [ -z "$limit" ]; then
|
||||
limit=0
|
||||
fi
|
||||
|
||||
if [ -z "$printremediation" ]; then
|
||||
printremediation="1"
|
||||
fi
|
||||
|
||||
# Load output formating
|
||||
. ./functions/output_lib.sh
|
||||
|
||||
|
@ -133,7 +125,6 @@ totalChecks=0
|
|||
currentScore=0
|
||||
|
||||
logit "Initializing $(date +%Y-%m-%dT%H:%M:%S%:z)\n"
|
||||
appendjson
|
||||
beginjson "$version" "$(date +%s)"
|
||||
|
||||
# Load all the tests from tests/ and run them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue