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 Jan 8, 2020
1 parent 4987f3a commit 4e3ba80
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 @@ -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 = [
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 @@ -48,6 +48,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 @@ -189,6 +189,7 @@ def test_scan_string_basic(
Base64HighEntropyString: {}
BasicAuthDetector : False
BoxDetector : False
CloudantDetector : False
DB2Detector : False
GHDetector : False
HexHighEntropyString : {}
Expand Down Expand Up @@ -221,6 +222,7 @@ def test_scan_string_basic_default(
ArtifactoryDetector: False
BasicAuthDetector : False
BoxDetector : False
CloudantDetector : False
DB2Detector : False
GHDetector : False
IBMCloudIAMDetector: False
Expand All @@ -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)
Expand Down Expand Up @@ -386,6 +389,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -441,6 +447,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -553,6 +562,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -607,6 +619,9 @@ def test_old_baseline_ignored_with_update_flag(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down Expand Up @@ -761,6 +776,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 @@ -201,6 +201,9 @@ def test_baseline_gets_updated(
{
'name': 'BoxDetector',
},
{
'name': 'CloudantDetector',
},
{
'name': 'DB2Detector',
},
Expand Down

0 comments on commit 4e3ba80

Please sign in to comment.