Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Telegram Mini App & Bot Security Audit

    1

    Telegram Mini Apps are everywhere now: shops, games, tap-to-earn, wallets, course platforms.

    Free

    1 useSecurity scanned
    Telegram Mini App & Bot Security Audit

    Telegram Mini App & Bot Security Audit

    Example session with this skill installed

    security audit this telegram mini app

    • Read your context and instructions
    • Compiled the telegram mini app

    Summary

    Real triage output from the bundled scanner on the intentionally vulnerable test project in the repo (tests/fixtures/vuln_app: an aiogram bot, an Express backend and a Mini App frontend). The agent then validates each lead against the code and writes the final report with fixes.

    Scanner leads (excerpt)

    telegram-miniapp-security-audit · vuln_app · 5 files · 19 rules
    
    CRITICAL TMA-SEC-002  Bot token exposed to the Mini App frontend
             webapp/src/main.js:13
    HIGH     TMA-AUTH-004 Login Widget key derivation used for Mini App initData
             server/auth_legacy.py:15
             secret = hashlib.sha256(BOT_TOKEN.encode()).digest()
    HIGH     TMA-SEC-003  Telegram Bot API called from the frontend
             webapp/src/main.js:13
    HIGH     TMA-PAY-001  Purchase granted from the client invoice callback
             webapp/src/main.js:27
             if (status === 'paid') unlockPremium();
    MEDIUM   TMA-BOT-001  Admin check by username
             bot/main.py:18
    MEDIUM   TMA-NET-001  Webhook set without a secret token
             bot/main.py:28
             await bot.set_webhook(WEBHOOK_URL)
    MEDIUM   TMA-AUTH-003 initData validated without an auth_date freshness check
             server/index.js:15
    MEDIUM   TMA-AUTH-002 Backend trusts a user id from the request
             server/index.js:22
             const userId = req.body.user_id;
    MEDIUM   TMA-AUTH-001 Identity taken from initDataUnsafe
             webapp/src/main.js:3
    MEDIUM   TMA-WEB-001  HTML injection sink in the Mini App
             webapp/src/main.js:5
    LOW      TMA-PAY-002  Pre-checkout query approved without checks
             bot/main.py:24
    ...
    19 leads  (critical: 1  high: 3  medium: 7  low: 7  info: 1)
    

    What happens next

    Leads are hints, not findings. The skill has the agent map how identity is established on every route, prove each lead is reachable, compare the initData validator with the bundled reference implementation of Telegram's algorithm, drop false positives, and write REPORT.md plus findings.json with a code-level fix for every confirmed issue.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Telegram Mini Apps are everywhere now: shops, games, tap-to-earn, wallets, course platforms. Most are built fast, and they break in the same handful of ways: the backend trusts initDataUnsafe.user.id or a user_id in the body, initData is checked with the Login Widget algorithm, the bot token sits in a VITE_ env var, the webhook has no secret_token, or premium unlocks when the openInvoice callback says paid.

    This skill gives your agent a Telegram-specific playbook and makes it prove each finding before reporting it.

    What it checks

    • initData & auth: the official HMAC algorithm, auth_date expiry, identity from initDataUnsafe, IDOR via client-sent ids
    • Bot: token in git or the frontend bundle, webhook secret_token, admins by username, HTML injection in messages
    • Payments: Telegram Stars and providers, pre_checkout_query checks, granting only on successful_payment, idempotent grants
    • Mini App frontend: XSS, start_param, openLink open redirects, tokens in localStorage, CSP
    • Backend: IDOR, referral and tap-to-earn abuse, CORS, initData in logs

    How it works

    1. Recon: where identity is established on every route, where value moves.
    2. A fast, zero-dependency scanner (Node 18+, 19 rules, JSON and SARIF output) collects leads.
    3. Area-by-area hunting with checklists, then a fresh verifier tries to disprove each candidate.
    4. You get REPORT.md and findings.json with severity, CWE, proof and a fix in your stack (aiogram, python-telegram-bot, Telegraf, grammY, Express, FastAPI, Laravel, Go, React/Vue, Flutter Web).

    Includes a dependency-free reference implementation of Telegram's initData validation with a self-test (rejects forged users, expired data, the wrong token and the Login Widget key).

    Open source

    Created and maintained by the author. The free, MIT-licensed source, GitHub Action and issue tracker live at https://github.com/MBotirjonDev/telegram-miniapp-audit

    Requires Node.js for automated scanning. Cannot audit external APIs or database rules missing from the project files. Does not perform live bot API calls.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    • Free with an Agensi account

    Requires

    Node.js 18+
    Python
    Node.js
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed19 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies vulnerabilities unique to the Telegram ecosystem, such as incorrect HMAC signature verification of `initData`, exposed bot tokens in client-side bundles, and logic flaws in Telegram Stars payment flows that allow for unauthorized transactions.

    It supports the most popular Telegram libraries including aiogram, telegraf, grammY, and the official Telegram Apps SDK, ensuring it understands the specific middleware and authentication patterns used in these frameworks.

    No, this skill is designed to perform a thorough audit of your source code, including frontend bundles and backend logic, to find hidden vulnerabilities that a simple black-box scan would miss.

    You will receive the complete Telegram-specific scanning engine, a set of adversarial verification checklists, and a structured reporting template that automates the generation of findings and code fixes.

    Unlike generic security prompts, this skill uses a multi-phase process that distinguishes between `initData` and `initDataUnsafe` and performs a secondary 'adversarial pass' to verify if a vulnerability is actually exploitable in your specific environment.

    The skill is designed to be compatible with any AI agent capable of file system access and command execution, provided a Node.js environment is available to run the specialized triage scanner.

    New in Security