Agent2Telegram lets a Telegram user run a coding agent — which can execute commands — on the host machine. Security is therefore a first-class concern.
- Authorization: only Telegram user ids in
allowed_user_idsmay drive the agent. Everyone else is refused. Keep this list to the device owner(s) only. - No shell injection: messages are passed to the agent as a single
argvelement; the bridge never usesshell=True. - Secret handling: the bot token lives only in a
0600config file (its directory is0700) or theTELEGRAM_BOT_TOKENenv var. It is never logged and is redacted indoctor//status. - No inbound exposure: the bridge uses Telegram long polling, so no port needs to be opened to the internet.
- Run the bridge under a dedicated, least-privileged OS user.
- Keep the connected agent CLI updated and logged in only to the intended account.
- Review
allowed_user_idsperiodically.
Please open a private security advisory on GitHub (Security → Report a vulnerability) or contact the maintainer rather than filing a public issue. We aim to respond within a few days.