diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py index 3b50d655..1414ffbf 100644 --- a/detect_secrets/plugins/keyword.py +++ b/detect_secrets/plugins/keyword.py @@ -64,6 +64,7 @@ 'contraseƱa', 'contrasena', 'recaptcha_.*key', + 'nessus_?key', ) # Includes ], ', " as closing CLOSING = r'[]\'"]{0,2}' diff --git a/tests/plugins/keyword_test.py b/tests/plugins/keyword_test.py index 41199db0..839ad6fa 100644 --- a/tests/plugins/keyword_test.py +++ b/tests/plugins/keyword_test.py @@ -48,6 +48,7 @@ ('private_key "hopenobodyfindsthisone\';', None), # Double-quote does not match single-quote) ('api.key = {}'.format(COMMON_SECRET), COMMON_SECRET), ('API-KEY = {}'.format(COMMON_SECRET), COMMON_SECRET), + ('nessus_key: {}'.format(COMMON_SECRET), COMMON_SECRET), (LONG_LINE, None), # Long line test ] @@ -88,6 +89,7 @@ ('password := "somefakekey"', None), # 'fake' in the secret ('some_key = "real_secret"', None), # We cannot make 'key' a Keyword, too noisy) ('private_key "hopenobodyfindsthisone\';', None), # Double-quote does not match single-quote) + ('nessus_key = {}"'.format(COMMON_SECRET), COMMON_SECRET), # Last character is ignored (LONG_LINE, None), # Long line test ]