Skip to content

Commit

Permalink
One more regex for iam (Yelp#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
XIANJUN ZHU authored and justineyster committed Sep 9, 2020
1 parent 2dd83ad commit 1299833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/plugins/ibm_cloud_iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IbmCloudIamDetector(RegexBasedDetector):
),
]

def verify(self, token, **kwargs):
def verify(self, token, *args, **kwargs):
response = verify_cloud_iam_api_key(token)
try:
if response.status_code != 200:
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ibm_cloud_iam_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TestIbmCloudIamDetector(object):
'payload, should_flag',
[
('ibm-cloud_api_key: {cloud_iam_key}'.format(cloud_iam_key=CLOUD_IAM_KEY), True),
('apikeyid: {cloud_iam_key}'.format(cloud_iam_key=CLOUD_IAM_KEY), True),
('ibm_cloud_iam-key : {cloud_iam_key}'.format(cloud_iam_key=CLOUD_IAM_KEY), True),
('IBM-API-KEY : "{cloud_iam_key}"'.format(cloud_iam_key=CLOUD_IAM_KEY), True),
('"iam_api_key" : "{cloud_iam_key}"'.format(cloud_iam_key=CLOUD_IAM_KEY), True),
Expand Down

0 comments on commit 1299833

Please sign in to comment.