Skip to content

Commit

Permalink
Catch api_key for SL token (Yelp#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
XIANJUN ZHU authored and GitHub Enterprise committed Apr 22, 2020
1 parent 87719d0 commit ecca6c2
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/softlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SoftlayerDetector(RegexBasedDetector):
secret_type = 'SoftLayer Credentials'

# opt means optional
sl = r'(?:softlayer|sl)(?:_|-|)(?:api|)'
sl = r'(?:softlayer|sl|)(?:_|-|)(?:api|)'
key_or_pass = r'(?:key|pwd|password|pass|token)'
secret = r'([a-z0-9]{64})'
denylist = [
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/softlayer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class TestSoftlayerDetector(object):
('http://api.softlayer.com/soap/v3/{sl_token}'.format(sl_token=SL_TOKEN), True),
('http://api.softlayer.com/soap/v3.1/{sl_token}'.format(sl_token=SL_TOKEN), True),
('softlayer_api_key: {sl_token}'.format(sl_token=SL_TOKEN), True),
('api_key: {sl_token}'.format(sl_token=SL_TOKEN), True),
('softlayer-key : {sl_token}'.format(sl_token=SL_TOKEN), True),
('SOFTLAYER-API-KEY : "{sl_token}"'.format(sl_token=SL_TOKEN), True),
('"softlayer_api_key" : "{sl_token}"'.format(sl_token=SL_TOKEN), True),
Expand Down

0 comments on commit ecca6c2

Please sign in to comment.