diff --git a/detect_secrets/core/usage.py b/detect_secrets/core/usage.py index 7851ba75..1b31ff6f 100644 --- a/detect_secrets/core/usage.py +++ b/detect_secrets/core/usage.py @@ -490,6 +490,12 @@ class PluginOptions(object): disable_help_text='Disable scanning for Box API credentials', is_default=True, ), + PluginDescriptor( + classname='CloudantDetector', + disable_flag_text='--no-cloudant-scan', + disable_help_text='Disable scanning for Cloudant credentials', + is_default=True, + ), ] default_plugins_list = [ diff --git a/detect_secrets/plugins/common/initialize.py b/detect_secrets/plugins/common/initialize.py index f17536a1..b2cfc18e 100644 --- a/detect_secrets/plugins/common/initialize.py +++ b/detect_secrets/plugins/common/initialize.py @@ -8,6 +8,7 @@ from ..base import BasePlugin from ..basic_auth import BasicAuthDetector # noqa: F401 from ..box import BoxDetector # noqa: F401 +from ..cloudant import CloudantDetector # noqa: F401 from ..common.util import get_mapping_from_secret_type_to_class_name from ..db2 import DB2Detector # noqa: F401 from ..gh import GHDetector # noqa: F401 diff --git a/detect_secrets/plugins/common/util.py b/detect_secrets/plugins/common/util.py index ab588509..3f796360 100644 --- a/detect_secrets/plugins/common/util.py +++ b/detect_secrets/plugins/common/util.py @@ -10,6 +10,7 @@ from ..base import BasePlugin from ..basic_auth import BasicAuthDetector # noqa: F401 from ..box import BoxDetector # noqa: F401 +from ..cloudant import CloudantDetector # noqa: F401 from ..db2 import DB2Detector # noqa: F401 from ..high_entropy_strings import Base64HighEntropyString # noqa: F401 from ..high_entropy_strings import HexHighEntropyString # noqa: F401 diff --git a/tests/core/usage_test.py b/tests/core/usage_test.py index c65f3653..784fa315 100644 --- a/tests/core/usage_test.py +++ b/tests/core/usage_test.py @@ -48,6 +48,7 @@ def test_consolidates_output_basic(self): 'PrivateKeyDetector': {}, 'AWSKeyDetector': {}, 'BoxDetector': {}, + 'CloudantDetector': {}, 'IBMCloudIAMDetector': {}, 'IBMCosHmacDetector': {}, 'SlackDetector': {}, diff --git a/tests/main_test.py b/tests/main_test.py index a972a909..7fb86873 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -189,6 +189,7 @@ def test_scan_string_basic( Base64HighEntropyString: {} BasicAuthDetector : False BoxDetector : False + CloudantDetector : False DB2Detector : False GHDetector : False HexHighEntropyString : {} @@ -221,6 +222,7 @@ def test_scan_string_basic_default( ArtifactoryDetector: False BasicAuthDetector : False BoxDetector : False + CloudantDetector : False DB2Detector : False GHDetector : False IBMCloudIAMDetector: False @@ -246,6 +248,7 @@ def test_scan_string_cli_overrides_stdin(self): Base64HighEntropyString: False (2.585) BasicAuthDetector : False BoxDetector : False + CloudantDetector : False DB2Detector : False GHDetector : False HexHighEntropyString : False (2.121) @@ -386,6 +389,9 @@ def test_old_baseline_ignored_with_update_flag( { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', }, @@ -441,6 +447,9 @@ def test_old_baseline_ignored_with_update_flag( { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', }, @@ -553,6 +562,9 @@ def test_old_baseline_ignored_with_update_flag( { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', }, @@ -607,6 +619,9 @@ def test_old_baseline_ignored_with_update_flag( { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', }, @@ -761,6 +776,9 @@ def test_scan_with_default_plugin(self): { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', }, diff --git a/tests/pre_commit_hook_test.py b/tests/pre_commit_hook_test.py index c92f15ad..cfc9aabf 100644 --- a/tests/pre_commit_hook_test.py +++ b/tests/pre_commit_hook_test.py @@ -201,6 +201,9 @@ def test_baseline_gets_updated( { 'name': 'BoxDetector', }, + { + 'name': 'CloudantDetector', + }, { 'name': 'DB2Detector', },