Skip to content

feat: enforce mandatory allowlist for security#7

Merged
Madh93 merged 1 commit intomainfrom
enforce-allowlist-by-default
Jul 8, 2025
Merged

feat: enforce mandatory allowlist for security#7
Madh93 merged 1 commit intomainfrom
enforce-allowlist-by-default

Conversation

@Madh93
Copy link
Copy Markdown
Owner

@Madh93 Madh93 commented Jun 24, 2025

This PR addresses the security vulnerability where the bot, by default, is open to all Telegram users. This change implements a "secure-by-default" policy as suggested:

  • Mandatory Allowlist: The telegram.allowlist is now a required configuration. The bot will refuse to start if it's left with the default placeholder value ([-1]).
  • User Action Required: Users must now explicitly configure the allowlist with their specific Chat ID(s). To maintain the old behavior of allowing all users, they must consciously set the allowlist to an empty array ([]), though this is discouraged.
  • Updated Documentation: The README.md has been significantly updated with a new Security Concerns section that explains this feature and provides clear instructions for users on how to find their Chat ID.

This makes the bot significantly more secure out-of-the-box and protects users from unsolicited messages and potential abuse.

Fixes #6

@Madh93 Madh93 merged commit ea5d741 into main Jul 8, 2025
1 check passed
@Madh93 Madh93 deleted the enforce-allowlist-by-default branch July 8, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce allowlist by default

1 participant