diff --git a/tests/filters/heuristic_filter_test.py b/tests/filters/heuristic_filter_test.py index 065ade6a7..72d2c31e5 100644 --- a/tests/filters/heuristic_filter_test.py +++ b/tests/filters/heuristic_filter_test.py @@ -90,7 +90,7 @@ def test_failure(self, secret, line): ( ('secret = {hunter2}', False), ('secret = ', False), - ('secret = hunter2', True), + ('secret = "hunter2"', True), ('secret= ${hunter2}', False), ), ) diff --git a/tests/plugins/keyword_test.py b/tests/plugins/keyword_test.py index 6126d6697..3fcd9c953 100644 --- a/tests/plugins/keyword_test.py +++ b/tests/plugins/keyword_test.py @@ -40,7 +40,7 @@ ('password = {}'.format(SYMBOL_SECRET), None), # At least 1 alphanumeric character is required ('api_key = ""', None), # Nothing in the quotes ("secret: ''", None), # Nothing in the quotes - ('secret = "abcdefghi"', None), # Alphabet sequential string + ('password = "somefakekey"', None), # 'fake' in the secret ('password: ${link}', None), # Has a ${ followed by a } ('some_key = "real_secret"', None), # We cannot make 'key' a Keyword, too noisy) ('private_key "hopenobodyfindsthisone\';', None), # Double-quote does not match single-quote) @@ -144,7 +144,7 @@ ('password = {}'.format(COMMON_SECRET), None), # Secret without quotes ('api_key = ""', None), # Nothing in the quotes ("secret: ''", None), # Nothing in the quotes - ('password = "somefakekey"', None), # 'fake' in the secret + ('secret = "abcdefghi"', None), # Alphabet sequential string ('password: ${link}', None), # Has a ${ followed by a } ('some_key = "real_secret"', None), # We cannot make 'key' a Keyword, too noisy) ('private_key "hopenobodyfindsthisone\';', None), # Double-quote does not match single-quote)