hermes-agent/gateway/platforms
Teknium 16accd44bd
fix(telegram): require TELEGRAM_WEBHOOK_SECRET in webhook mode (#13527)
When TELEGRAM_WEBHOOK_URL was set but TELEGRAM_WEBHOOK_SECRET was not,
python-telegram-bot received secret_token=None and the webhook endpoint
accepted any HTTP POST. Anyone who could reach the listener could inject
forged updates — spoofed user IDs, spoofed chat IDs, attacker-controlled
message text — and trigger handlers as if Telegram delivered them.

The fix refuses to start the adapter in webhook mode without the secret.
Polling mode (default, no webhook URL) is unaffected — polling is
authenticated by the bot token directly.

BREAKING CHANGE for webhook-mode deployments that never set
TELEGRAM_WEBHOOK_SECRET. The error message explains remediation:

  export TELEGRAM_WEBHOOK_SECRET="$(openssl rand -hex 32)"

and instructs registering it with Telegram via setWebhook's secret_token
parameter. Release notes must call this out.

Reported in GHSA-3vpc-7q5r-276h by @bupt-Yy-young. Hardening — not CVE
per SECURITY.md §3 "Public Exposure: Deploying the gateway to the
public internet without external authentication or network protection"
covers the historical default, but shipping a fail-open webhook as the
default was the wrong choice and the guard aligns us with the SECURITY.md
threat model.
2026-04-21 06:23:09 -07:00
..
qqbot refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
__init__.py feat(gateway): unify QQBot branding, add PLATFORM_HINTS, fix streaming, restore missing setup functions 2026-04-14 00:11:49 -07:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
base.py fix(agent): normalize socks:// env proxies for httpx/anthropic 2026-04-21 05:52:46 -07:00
bluebubbles.py refactor: remove remaining redundant local imports (comprehensive sweep) 2026-04-21 00:50:58 -07:00
dingtalk.py feat(dingtalk): AI Cards streaming, emoji reactions, and media handling 2026-04-17 19:26:53 -07:00
discord.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
email.py fix(gateway): validate Slack image downloads before caching 2026-04-10 03:53:09 -07:00
feishu.py feat(feishu): show processing state via reactions on user messages 2026-04-20 02:04:57 -07:00
feishu_comment.py feat: add Feishu document comment intelligent reply with 3-tier access control 2026-04-17 19:04:11 -07:00
feishu_comment_rules.py fix(feishu-comment): use get_hermes_home(); drop dead asyncio wrapper; AUTHOR_MAP 2026-04-17 19:04:11 -07:00
helpers.py fix: enforce TTL in MessageDeduplicator + use yaml for gateway --config (#10306, #10216) (#10509) 2026-04-15 13:35:40 -07:00
homeassistant.py fix(gateway): add request timeouts to HA, Email, Mattermost, SMS adapters (#3258) 2026-03-26 14:36:07 -07:00
matrix.py fix(gateway): accept finalize kwarg in all platform edit_message overrides 2026-04-19 22:46:47 -07:00
mattermost.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
signal.py fix(gateway): prevent scoped lock and resource leaks on connection failure 2026-04-20 01:44:36 -07:00
slack.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
sms.py remove unused import and fix misleading log 2026-04-11 14:05:38 -07:00
telegram.py fix(telegram): require TELEGRAM_WEBHOOK_SECRET in webhook mode (#13527) 2026-04-21 06:23:09 -07:00
telegram_network.py feat(telegram): add dedicated TELEGRAM_PROXY env var and config.yaml proxy_url support 2026-04-15 22:13:11 -07:00
webhook.py fix(webhook): validate HMAC signature before rate limiting (#12544) 2026-04-19 22:45:08 -07:00
wecom.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
wecom_callback.py fix: activate WeCom callback message deduplication (#10305) (#10588) 2026-04-15 17:22:58 -07:00
wecom_crypto.py feat(gateway): add WeCom callback-mode adapter for self-built apps 2026-04-11 15:22:49 -07:00
weixin.py Fix Weixin media uploads and refresh lockfile 2026-04-17 06:50:36 -07:00
whatsapp.py refactor: remove remaining redundant local imports (comprehensive sweep) 2026-04-21 00:50:58 -07:00