clawwork-ai/ClawWork

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

Geschlossen

#211 geöffnet am 31.03.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (76 Forks)github user discovery
area/coregood first issuehelp wantedkind/bugsecurity

Repository-Metriken

Stars
 (529 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 22T) (2 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide