T01 · Skill Instruction Hijacking
- Location
src/evolve.js:1978- Finding
Untrusted Hub Content Is Injected into an Executor Agent Prompt
- Content
View full analysis
0) { hubLessons = fetchResult.relevant_lessons; console.log(`[LessonBank] Received ${hubLessons.length} lesson(s) from ecosystem.`); } ``` ```js const prompt = isDirectReuse ? buildReusePrompt({ capsule: hubHit.match, signals, nowIso: new Date().toISOString(), }) : buildGepPrompt({ nowIso: new Date().toISOString(), context, signals, selector, parentEventId: getLastEventId(), selectedGene, capsuleCandidates, genesPreview, capsulesPreview, capabilityCandidatesPreview, externalCandidatesPreview, hubMatchedBlock, strategyPolicy, failedCapsules: recentFailedCapsules, hubLessons, }); ``` ```js const executorTask = [ 'You are the executor (the Hand).', 'Your job is to apply a safe, minimal patch in this repo following the attached GEP protocol prompt.', artifact && artifact.promptPath ? `Prompt file: ${artifact.promptPath}` : 'Prompt file: (unavailable)', '', 'After applying changes and validations, you MUST run:', ' node index.js solidify', '', 'Loop chaining (only if you are running in loop mode): after solidify succeeds, print a sessions_spawn call to start the next loop run with a short delay.', 'Example:', 'sessions_spawn({ task: "exec: node skills/feishu-evolver-wrapper/lifecycle.js ensure", agentId: "main", cleanup: "delete", label: "gep_loop_next" })', '', 'GEP protocol prompt (may be truncated here; prefer the prompt file if provided):', clip(prompt, 24000), ].join('\n'); const spawn = renderSessionsSpaw ...[truncated 2516 chars]- Remediation
View remediation
