Skip to content
Snippets Groups Projects
Verified Commit e71a9aae authored by Mateusz Żebrak's avatar Mateusz Żebrak
Browse files

Use long options in check_is_private_key_nor_password_is_not_logged

parent d0e80724
No related branches found
No related tags found
2 merge requests!415CI check_... scripts improvements,!412V1.27.5.13 release
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
function find_password_private_keys() { function find_password_private_keys() {
find . -path "*/clive/*/latest.log" -print0 | find . -path "*/clive/*/latest.log" -print0 |
xargs -0 \ xargs -0 \
grep \ grep --with-filename --line-number --ignore-case --word-regexp --extended-regexp \
-Hn -i -w -E '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' | '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' |
grep "$@" -v -E '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)' grep "$@" --invert-match --extended-regexp \
'(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)'
} }
amount_of_occurences=$(find_password_private_keys -c) amount_of_occurences=$(find_password_private_keys --count)
if [[ $amount_of_occurences -ne 0 ]]; then if [[ $amount_of_occurences -ne 0 ]]; then
echo "Error! Found $amount_of_occurences occurrences of private key or password" echo "Error! Found $amount_of_occurences occurrences of private key or password"
find_password_private_keys 2>&1 find_password_private_keys 2>&1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment