Telegram Mini App Security Auditor
简介
Telegram Mini App Security Auditor
原始描述
Audit Telegram Mini App projects for launch safety before connecting bot tokens or public channels. Use when Codex needs to review a Telegram WebApp/Mini App...
通过你的 Agent 添加
安装目录:telegram-miniapp-security-auditor/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: telegram-miniapp-security-auditor
description: Audit Telegram Mini App projects for launch safety before connecting bot tokens or public channels. Use when Codex needs to review a Telegram WebApp/Mini App, TMA frontend, FastAPI/Node backend, BotFather launch runbook, Colab/ngrok deployment, or OpenClaw/Codex skill that handles Telegram initData, bot tokens, admin endpoints, CORS, PII, request forms, or public channel launch readiness.
Telegram Mini App Security Auditor
Audit Telegram Mini Apps with a static, evidence-first workflow. Prefer the bundled script for repeatability, then inspect the flagged files before giving launch advice.
Quick Start
Run the static auditor from the skill folder:
python3 /Users/zack/.codex/skills/telegram-miniapp-security-auditor/scripts/audit_tma.py \
/path/to/project \
--out-dir /tmp/tma-audit
Expected outputs:
tma_security_audit.jsontma_security_audit.md
Decision meanings:
PASS: no blocking or review-triggering evidence found by this static pass.REVIEW: launch only after a human verifies the listed risks.BLOCK: do not launch or connect production bot tokens until fixed.
Workflow
- Run
scripts/audit_tma.py against the project root or Mini App subdirectory.
- Read the Markdown report and inspect every
BLOCK and REVIEW file reference.
- If the app is not detected as a Telegram Mini App, confirm whether the user passed the correct path.
- For production launch, require all of these:
- server-side Telegram
initData validation,
- no committed bot tokens or token-like literals,
- admin endpoints protected by server-side authorization,
- no broad CORS in production,
- request forms reject or avoid contact details, handles, secrets, and payment terms when governance requires it,
- local/browser QA evidence before BotFather or channel changes.
- If packaging as a ClawHub/Codex skill, run TrustClaw after this audit:
trustclaw scan /path/to/skill --format markdown
Finding Triage
scripts/audit_tma.py against the project root or Mini App subdirectory.BLOCK and REVIEW file reference.- server-side Telegram
initDatavalidation, - no committed bot tokens or token-like literals,
- admin endpoints protected by server-side authorization,
- no broad CORS in production,
- request forms reject or avoid contact details, handles, secrets, and payment terms when governance requires it,
- local/browser QA evidence before BotFather or channel changes.
trustclaw scan /path/to/skill --format markdown
Treat script output as static evidence, not a final proof of safety.
hardcoded-telegram-token: alwaysBLOCK; rotate the token if it was committed.initdata-no-server-validation:BLOCK; Mini App users must not be trusted from client-side data alone.insecure-initdata-bypass: usuallyREVIEW; acceptable only for clearly documented local dev commands and disabled-by-default server behavior.cors-wildcard:REVIEW, orBLOCKif credentials are also enabled.admin-endpoint-without-guard:BLOCK.unsafe-innerhtml:REVIEW; verify escaping or sanitization.
For detailed rules and manual checks, read references/tma-security-checklist.md only when needed.
Output Contract
When answering a user, lead with:
- decision,
- highest-severity findings with file paths,
- launch recommendation,
- artifacts produced,
- any limitations of the audit.
Keep live Telegram/BotFather/channel changes out of scope unless the user explicitly asks to launch and the project has passed audit and QA.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。