tg-cli
Warn
Audited by Gen Agent Trust Hub on Nov 3, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
listencommand implementation intg_cli.py(and thebin/tgsymlink) includes an--execoption that allows the execution of arbitrary shell commands. It usessubprocess.Popenwithshell=True, which poses a significant risk as it allows for the execution of arbitrary system commands on the host machine. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data from an external source (Telegram messages) and provides the agent with powerful capabilities like sending messages, downloading files, and executing shell commands. This creates a surface where malicious message content could potentially influence the agent to perform unintended actions.
- Ingestion points: Telegram messages are ingested via the
read,folder,search, andlistencommands intg_cli.py. - Boundary markers: No explicit boundary markers or instructions to treat message content as untrusted were found in the skill's instructions.
- Capability inventory: The skill can write files (
tg download), send messages (tg send), and execute shell commands (tg listen --exec). - Sanitization: No evidence of sanitization or escaping of external message content was found before it is processed or displayed.
- [CREDENTIALS_UNSAFE]: The skill manages highly sensitive Telegram authentication data, including session files (
~/.config/tg-cli/session.session) and API credentials (~/.config/tg-cli/config.json). These files grant full, persistent access to the user's Telegram account. While the skill correctly sets file permissions tochmod 600, these remain high-value targets for local attacks. - [EXTERNAL_DOWNLOADS]: The skill relies on and recommends the installation of
transcribe-cli, an external tool for audio transcription. If the--transcribeflag is used, the skill will attempt to execute thetranscribebinary from the system's PATH or a local directory.
Audit Metadata