T01 · Skill Instruction Hijacking
- Location
scripts/fetch_explosive_articles.py:1041- Finding
Generated Reports Contain Instructions That Hijack Agent Output
- Content
View full analysis
") full_output_lines.append("") # If the date was switched automatically, notify the user first if auto_switched: full_output_lines.append(f"**数据还没更新,目前最新数据到{start_date}。我将直接为您查询{start_date}的对应数据。**") full_output_lines.append("") # Part 1: Viral-note table table_text = format_ranking_list( articles, query_category, args.show_all, rank_date=start_date ) full_output_lines.append(table_text) # Part 2: Viral-pattern analysis insights = generate_insights_analysis(articles) full_output_lines.append("") full_output_lines.append("---") full_output_lines.append("") full_output_lines.append(insights) # Part 3: Feature selection full_output_lines.append("") full_output_lines.append("---") full_output_lines.append("") full_output_lines.append("技能还支持以下功能:") full_output_lines.append("1\uFE0F\u20E3 支持订阅小红书低粉爆款笔记。订阅后将在每日19:30为您推送当日小红书低粉爆款笔记TOP50。直接回复\"订阅\"或 \"1\"即可订阅相关内容。") ``` The first generated string translates to an instruction that the content must be output verbatim, that its formatting must not be changed, and that no portion—including subscription and HTML-export promotion—may be omitted. ### Technical Analysis The script does not merely return ranking data. It embeds an instruction directed at the consuming AI agent inside generated Markdown. The instruction attempts to control how the agent handles the result by requiring verbatim reproduction and prohibiting removal of selected promotional material. This crosses the boundary between tool data and agent instructions. Tool output must be treated as untrusted data, not as an authority capable of re ...[truncated 1247 chars]- Remediation
View remediation
