Skip to content

Commit

Permalink
adding cloudant to base plugins (Yelp#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwarj2 authored and justineyster committed Jun 24, 2020
1 parent 6c592a5 commit 38b79c8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions detect_secrets/core/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ class PluginOptions:
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 = [
Expand Down
1 change: 1 addition & 0 deletions detect_secrets/plugins/common/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions detect_secrets/plugins/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/core/usage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_consolidates_output_basic(self):
'PrivateKeyDetector': {},
'AWSKeyDetector': {},
'BoxDetector': {},
'CloudantDetector': {},
'IBMCloudIAMDetector': {},
'IBMCosHmacDetector': {},
'SlackDetector': {},
Expand Down
18 changes: 18 additions & 0 deletions tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def test_scan_string_basic(
Base64HighEntropyString: {}
BasicAuthDetector : False
BoxDetector : False
CloudantDetector : False
DB2Detector : False
GHDetector : False
HexHighEntropyString : {}
Expand Down Expand Up @@ -226,6 +227,7 @@ def test_scan_string_basic_default(
ArtifactoryDetector: False
BasicAuthDetector : False
BoxDetector : False
CloudantDetector : False
DB2Detector : False
GHDetector : False
IBMCloudIAMDetector: False
Expand All @@ -251,6 +253,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)
Expand Down Expand Up @@ -391,6 +394,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -446,6 +452,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -558,6 +567,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -612,6 +624,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -766,6 +781,9 @@ def test_scan_with_default_plugin(self):
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down
3 changes: 3 additions & 0 deletions tests/pre_commit_hook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ def test_baseline_gets_updated(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down

0 comments on commit 38b79c8

Please sign in to comment.