Skip to content

Commit

Permalink
Small DB2 Detector performance enhancment (Yelp#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
justineyster committed Jun 24, 2020
1 parent 4ab6009 commit 6c592a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion detect_secrets/plugins/db2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def verify(self, token, content, potential_secret, timeout=5):
content, self.username_keyword_regex,
self.username_regex,
)
if not username_matches:
return VerifiedResult.UNVERIFIED

database_matches = find_other_factor(
content, self.database_keyword_regex,
self.database_regex,
Expand All @@ -85,7 +88,7 @@ def verify(self, token, content, potential_secret, timeout=5):
port_matches.append(port)
database_matches.append(database)

if not username_matches or not database_matches or not port_matches or not hostname_matches:
if not database_matches or not port_matches or not hostname_matches:
return VerifiedResult.UNVERIFIED

for username in username_matches: # pragma: no cover
Expand Down

0 comments on commit 6c592a5

Please sign in to comment.