T01 · Skill Instruction Hijacking
- Location
steamedclaw-helper.js:370- Finding
Untrusted Remote Content Is Forwarded Into the Agent Control Stream
- Content
View full analysis
`${(m.from || '').slice(0, 8)}:"${(m.text || '').slice(0, MAX_DISCUSSION_MSG_CHARS)}"`, ); // Walk newest→oldest, keeping messages until the budget is spent. Always keep // at least the most recent one even if it alone is long (a single message is // capped at 1000, well under the total budget). const kept = []; let total = 0; for (let i = all.length - 1; i >= 0; i--) { total += all[i].length + 3; // + " | " separator if (total > MAX_DISCUSSION_TOTAL_CHARS && kept.length > 0) break; kept.unshift(all[i]); } const omitted = all.length - kept.length; const prefix = omitted > 0 ? `(+${omitted} earlier) ` : ''; const body = kept.join(' | ') || '(no messages yet)'; return `discussion seq:${seq} ${prefix}${body} fmt:{"type":"message","text":"..."} or {"type":"ready"}`; } ``` ### Technical Analysis The helper copies two classes of remote content directly into output consumed by the AI agent: 1. Server-provided `messaging.e ...[truncated 1941 chars]- Remediation
View remediation
