mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Improved Telegram bot token rule regex and added more test cases (#1404)
Co-authored-by: toxyl <tox@novasonica.com>
This commit is contained in:
1 parent
575e923cf8
commit
bb4424d454
2 files changed
+34
-7
No files matched your search
@@ -2766,7 +2766,7 @@ keywords = [
|
||||
[[rules]]
|
||||
id = "telegram-bot-api-token"
|
||||
description = "Detected a Telegram Bot API Token, risking unauthorized bot operations and message interception on Telegram."
|
||||
regex = '''(?i)(?:^|[^0-9])([0-9]{5,16}:A[a-zA-Z0-9_\-]{34})(?:$|[^a-zA-Z0-9_\-])'''
|
||||
regex = '''(?i)(?:^|\b|bot)([0-9]{5,16}:A[a-z0-9_\-]{34})(?:$|\b[^_\-])'''
|
||||
keywords = [
|
||||
"telegram","api","bot","token","url",
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user