clawwork-ai/ClawWork

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

クローズ

#211 opened on 2026/03/31

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (74 件のフォーク)github user discovery
area/coregood first issuehelp wantedkind/bugsecurity

Repository metrics

Stars
 (525 個のスター)
PR merge metrics
 (平均マージ 22d) (30d で 2 merged PRs)

説明

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.

コントリビューターガイド