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

Add exclude-dir to check_is_private_key_nor_password_is_not_logged script

Because as can be observed there:
https://gitlab.syncad.com/hive/clive/-/jobs/1260490#L88

test-tools seems to log all envrionment variables which also include
CI_COMMIT_MESSAGE during CI and when e.g "password" text is used in
the commit name, there will be a false positive.
parent 7d484517
No related branches found
No related tags found
2 merge requests!415CI check_... scripts improvements,!412V1.27.5.13 release
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
function find_password_private_keys() { function find_password_private_keys() {
grep \ grep \
--include="latest.log*" \ --include="latest.log*" \
--exclude-dir="*Node[0-9]" \
-r -i -w -E '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' | -r -i -w -E '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' |
grep "$@" -v -E '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)' grep "$@" -v -E '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)'
} }
......
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