Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PiDroid-B/8bea04741e96bea249d7835acf0ed65d to your computer and use it in GitHub Desktop.
Save PiDroid-B/8bea04741e96bea249d7835acf0ed65d to your computer and use it in GitHub Desktop.
#!/bin/bash
DIR="/root/docker-bench-security/output"
# id of test to exclude (sep = comma)
TEST_TO_EXCLUDE="1.1.1"
[[ -n "$TEST_TO_EXCLUDE" ]] && TEST_TO_EXCLUDE="-e ${TEST_TO_EXCLUDE}"
[ -e "${DIR}/last" ] && mv "${DIR}/last" "${DIR}/last_1"
sh docker-bench-security.sh ${TEST_TO_EXCLUDE} > "${DIR}/last"
cp "${DIR}/last" "${DIR}/$(date '+%y%m%d_%H%M%S')"
echo
[ -e "${DIR}/last" ] && [ -e "${DIR}/last_1" ] && diff -y --suppress-common-lines "${DIR}/last" "${DIR}/last_1"
echo
echo "cat ${DIR}/last | most"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment