other
- Location
plugin/dist/services/context-lifecycle-service.js:634- Finding
Automatic capture does not enforce configured filtering and length restrictions ## Remediation Suggestions 1. Apply the configured capture decision before constructing or transmitting outgoing text parts. Ensure both `captureMode` and `captureMaxLength` affect the active lifecycle path. 2. Define whether the maximum applies per message or per turn, document that contract consistently, and enforce it locally before any network request. Add a separate byte limit for transport and resource protection. 3. Introduce explicit controls for capturing assistant messages, tool arguments, and tool outputs. Prefer disabling tool-content capture by default or limiting it to approved tools. 4. Redact sensitive fields and known credential patterns before transmission. Do not treat whitespace cleanup or metadata removal as secret redaction. 5. Keep session archival and semantic memory extraction policies distinct. If full transcript archival is required, disclose it explicitly rather than presenting extraction filters as transmission controls. 6. Add transport-level regression tests proving that nonmatching keyword text, oversized content, and disabled tool-content categories never reach the HTTP client.
- Content
View full analysis
Vulnerability Details
File Location:
plugin/dist/services/context-lifecycle-service.js:634–693plugin/dist/text-utils.js:292–376plugin/dist/client.js:378–397
Vulnerability Type: Ineffective data-capture controls / excessive data transmission
Risk Level: MediumVulnerable Code
The lifecycle handler extracts captured messages without providing the configured capture mode or maximum length:
js const { messages: extractedMessagesRaw, newCount } = extractNewTurnMessages(messages, start); const extractedMessages = coalesceConsecutiveToolMessages(extractedMessagesRaw);It constructs outgoing message parts and transmits them without enforcing either setting:
js const ovParts = msg.parts.map((part) => { if (part.type === "text") { const cleaned = part.text .replace(/<relevant-memories>[\s\S]*?<\/relevant-memories>/gi, " ") .replace(/\s+/g, " ") .trim(); return { type: "text", text: cleaned }; } return { type: "tool", tool_id: part.toolCallId, tool_name: part.toolName, tool_input: part.toolInput, tool_output: part.toolOutput, tool_status: part.toolStatus, }; }); if (ovParts.length > 0) { await client.addSessionMessage(ovSessionId, msg.role, ovParts, undefined, createdAt, resolveOpenVikingMessagePeerId({ peerRole: cfg.peer_role ?? "none", role: msg.role, senderPeerId: senderRoleId, assistantPeerId: agentId, })); }Technical Analysis
The plugin exposes
captureModeandcaptureMaxLengthas configuration controls. Its manifest describes keyword-based filtering and a maximum sanitized user-text length for automatic capture.However, the active after-turn capture path does not consume either setting. Although
getCaptureDecision()implements keyword and length checks,extractNewTurnMessages()does not call it. Instead, it sanitizes message text and collects tool ...[truncated 2329 chars]
