Skip to content

Commit

Permalink
fix(telegram_bot_token): Regex must match just bot tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jfagoagas authored Sep 3, 2024
1 parent 6cdb79b commit efc122a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/plugins/telegram_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TelegramBotTokenDetector(RegexBasedDetector):

denylist = [
# refs https://core.telegram.org/bots/api#authorizing-your-bot
re.compile(r'\d{8,10}:[0-9A-Za-z_-]{35}'),
re.compile(r'^\d{8,10}:[0-9A-Za-z_-]{35}$'),
]

def verify(self, secret: str) -> VerifiedResult: # pragma: no cover
Expand Down

0 comments on commit efc122a

Please sign in to comment.