在连接机器人令牌或公开频道前,对 Telegram Mini App 项目进行上线安全审查。适用于 Codex 需要审查 Telegram WebApp/Mini App 的场景。
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.
Run the static auditor from the skill folder:
bash
python3 {baseDir}/scripts/audit_tma.py \
/path/to/project \
--out-dir /tmp/tma-audit
Expected outputs:
tma_security_audit.jsontma_security_audit.mdDecision 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.scripts/audit_tma.py against the project root or Mini App subdirectory.BLOCK and REVIEW file reference.initData validation,bash
trustclaw scan /path/to/skill --format markdown
Treat script output as static evidence, not a final safety determination.
hardcoded-telegram-token: always BLOCK; 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: usually REVIEW; acceptable only for clearly documented local dev commands and disabled-by-default server behavior.cors-wildcard: REVIEW, or BLOCK if 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.
When answering a user, lead with:
Keep live Telegram/BotFather/channel changes out of scope unless the user explicitly asks to launch and the project has passed audit and QA.