diff --git a/scripts/check_for_dangling_beekeeper.bash b/scripts/check_for_dangling_beekeeper.bash index d04ed19d67e23000468d206f46ce0c527f665198..79c58587f07d660b6e6b6c53f5003d2b0cf38c9a 100755 --- a/scripts/check_for_dangling_beekeeper.bash +++ b/scripts/check_for_dangling_beekeeper.bash @@ -1,6 +1,8 @@ #!/bin/bash -count=$(pgrep "beekeeper" -c) +set -euo pipefail + +count=$(pgrep "beekeeper" --count || true) if [[ $count -gt 0 ]]; then echo "Error: There is dangling 'beekeeper' process left." diff --git a/scripts/check_is_private_key_nor_password_is_not_logged.bash b/scripts/check_is_private_key_nor_password_is_not_logged.bash index 67e3dd7941d67186de36cecc27a36b1c46a87800..604e9593e9315096e045f6820673c05318453bd6 100755 --- a/scripts/check_is_private_key_nor_password_is_not_logged.bash +++ b/scripts/check_is_private_key_nor_password_is_not_logged.bash @@ -1,12 +1,14 @@ #!/bin/bash +set -euo pipefail + function find_password_private_keys() { find . -path "*/clive/*/latest.log" -print0 | xargs -0 \ grep --with-filename --line-number --ignore-case --word-regexp --extended-regexp \ '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' | grep "$@" --invert-match --extended-regexp \ - '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)' + '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)' || true } amount_of_occurrences=$(find_password_private_keys --count)