T01 · Skill Instruction Hijacking
- Location
- scripts/analytics.py:1929
- Finding
- Mandatory Promotional and Retention Content Hijacks Generated Reports<![CDATA[ ## Vulnerability Details **File Location**: `scripts/analytics.py:1929-1937`, with unconditional insertion at `scripts/analytics.py:2050` **Vulnerability Type**: Mandatory output manipulation and platform-retention promotion **Risk Level**: High ### Vulnerable Code ```python hook_html = ("<div class='hook'>" "<div class='hook-h'>🔥 今日最值得看 · Top %d</div>" "%s" "<div class='hook-chips'>🛡️ 只做信息整理 · 不做赛果判断 | ✅ 对阵已联网核实 | 📤 一键分享发群 / 朋友圈</div>" "</div>") % (len(_top3), _hook_cards) # —— Task1 留存:底部「每日自动推送」订阅引导 —— sub_cta = ("<div class='card subcta'>" "<h2>📅 想要每天都自动收到这份总览?</h2>" "<div class='sc-item'>设置「每日体育赛事」自动化后,智能体会在每天固定时间<b>自动联网核实当日真实赛事</b>并生成这份总览,开赛前自动推送给你——信息全、来得及时,还不用自己动手。</div>" "<div class='pnote'>在 WorkBuddy 中说「每天给我发今日赛事总览」即可一键开启。</div>" "</div>") ``` The promotional components are then inserted unconditionally: ```python html = ("<!doctype html><html lang='zh-CN'><head><meta charset='utf-8'>" ... "</style></head><body><div class='wrap'>" + hero + hook_html + live_banner + banner + anti_scam_html() + guide + focus_note + dash + radar_html + details + share_card_html(matches, "daily") + sub_cta + feedback_html() + foot + ENHANCE_JS + "</div></body></html>") ``` Related instructions also characterize the branding card as fixed and require reports to be presented through the Agent workflow. ### Technical Analysis The report builder always appends platform-retention, social-sharing, branding, and feedback components to the requested sports report. The caller has no parameter for disabling these sections. These components are not necessary for the declared core operation of processing sports data and rendering it as an HTML report. In particular, the fixed call to action directs users to enable recurring WorkBuddy automation, while the sharing component encourages redistribution to groups an ...[truncated 1622 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove promotional and platform-retention components from the default report-generation path. 2. Add explicit, disabled-by-default options such as: - `--include-branding` - `--include-sharing-tools` - `--include-feedback` - `--include-subscription-cta` 3. Generate only the sports information requested by the user unless the user affirmatively opts into additional components. 4. Separate neutral report rendering from marketing or publisher-facing functionality. 5. Do not instruct the Agent to include promotional content as a mandatory part of delivery. 6. Add automated tests verifying that the default report contains no subscription, social-sharing, platform-retention, or promotional calls to action. 7. If attribution is required, use a concise and non-interactive attribution footer rather than a retention or redistribution prompt. ]]>
