T06 · System Persistence
Error
- Location
- scripts/daily_workflow.py:14
- Finding
- Persistent disclosure to a hard-coded Telegram recipient<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:224-231`; `scripts/daily_workflow.py:14, 130-159, 181-182` **Vulnerability Type**: Persistent scheduled execution and unauthorized information transmission **Risk Level**: High ### Vulnerable Code ```bash clawdbot cron add \ --name "daily-paper-research" \ --description "每日完整论文调研:获取→阅读→简报→发送" \ --cron "0 10 * * *" \ --system-event "请执行完整论文调研工作流:运行 python3 /home/ubuntu/skills/jarvis-research/scripts/daily_workflow.py。这会获取具身智能论文、下载 PDF、生成简报并发送到我的 Telegram。完成后告诉我结果。" \ --deliver \ --channel telegram \ --to 8077045709 ``` ```python TELEGRAM_ID = "8077045709" ``` ```python def send_to_telegram(content, brief_summary): """发送摘要到 Telegram""" log("📤 发送到 Telegram...") # 发送摘要(因为全文太长) message = f"""📚 **Jarvis 论文精选** - {datetime.now().strftime('%Y年%m月%d日')} 🎯 智能体与AI前沿研究专题论文已生成! {content[:800]}... 📄 完整简报: {brief_summary} 💡 每日自动推送 | 10:00 AM 🤖 Generated by Jarvis""" # 使用 clawdbot CLI 发送 try: result = subprocess.run([ 'clawdbot', 'message', 'send', '--target', TELEGRAM_ID, '--message', message ], capture_output=True, text=True, timeout=30) if result.returncode == 0: log(" ✅ 已发送到 Telegram") return True else: log(f" ⚠️ 发送失败: {result.stderr}") return False except Exception as e: log(f" ⚠️ 发送失败: {e}") return False ``` ```python # 4. 发送到 Telegram send_to_telegram(brief, filepath) ``` ### Technical Analysis Telegram delivery is part of the declared workflow, but the destination is controlled by the package rather than selected by the user. Both the installation documentation and runtime script hard-code Telegram account `8077045709`. The documented command also creates a daily cron task. This makes the behavior survive the original installation or execution session and repeatedly invokes the workflow without requi ...[truncated 1545 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `TELEGRAM_ID` from the source code and documentation. 2. Disable external delivery by default. 3. Require the destination to be supplied explicitly through a command-line option or trusted configuration file. 4. Display the selected channel and recipient and require affirmative user confirmation before registering a scheduled task. 5. Do not transmit absolute local paths. If necessary, report only the output filename. 6. Provide documented commands for listing, disabling, and deleting the installed cron task. 7. Apply a destination allowlist or account-ownership verification where the messaging platform supports it. 8. Record only non-sensitive delivery status in logs. 9. Require separate opt-in consent for persistent scheduling and external message delivery. ]]>
