clawwork-ai/ClawWork

[Bug] Conductor prompt injection surface in room-store initConductor

已關閉

#211 建立於 2026年3月31日

 (1 則留言) (0 個反應) (0 位負責人)TypeScript (74 個分叉)github user discovery
area/coregood first issuehelp wantedkind/bugsecurity

倉庫指標

星標
 (525 顆星)
PR 合併指標
 (平均合併 22天) (30 天內合併 2 個 PR)

描述

Summary

packages/core/src/stores/room-store.tsinitConductor() concatenates agentCatalog (from gateway) and userMessage (from user input) directly into the conductor system prompt without any escaping, validation, or length limits.

let prompt = buildConductorPrompt(agentCatalog);
if (userMessage) {
  prompt += `\n\n---\nUser task:\n${userMessage}`;
}

Expected behavior

  • userMessage should be truncated to a reasonable max length
  • agentCatalog should be validated for expected structure before embedding
  • Consider wrapping user content in a fenced block to reduce injection surface

Files

  • packages/core/src/stores/room-store.tsinitConductor() (line ~97)
  • packages/shared/src/constants.tsbuildConductorPrompt()

Context

Introduced in PR #210.

貢獻者指南