other
- Location
plugin/dist/index.js:1828- Finding
Incomplete sensitive-content filtering allows automatic persistence of conversational secrets ## Remediation Suggestions 1. **Enforce a shared policy before transmission.** Route automatic capture, pre-compaction storage, and relevant tool-driven persistence through a common sensitive-content validation layer. Do not rely exclusively on model-facing instructions. 2. **Handle natural-language disclosures.** Detect credential constructions such as “my password is …” and “the API key is …”, alongside conventional assignment formats. Reject or redact sensitive values before invoking backend storage. 3. **Add payment-card protection.** Detect plausible card-number candidates with common separators and validate candidates using appropriate length and checksum checks. 4. **Minimize captured content.** Persist narrowly extracted durable facts rather than complete conversation turns. Revalidate extracted facts before submission. 5. **Require confirmation for sensitive persistence.** Skip suspected sensitive content by default and use an explicit, informed confirmation flow where intentional storage is supported. 6. **Add regression tests.** Cover natural-language credentials, card numbers, mixed sensitive and nonsensitive turns, automatic capture, and pre-compaction storage. Assert that rejected values never reach the backend request. 7. **Review existing stored data where appropriate.** Operators who enabled automatic capture should assess whether sensitive records require deletion through supported lifecycle controls.
- Content
View full analysis
Vulnerability Details
File Location:
plugin/dist/index.js:1828–1861(capture filter),plugin/dist/index.js:3434–3458(automatic capture and storage).
Vulnerability Type: Sensitive information exposure through insufficient filtering before transmission and persistence.
Risk Level: Medium.Technical Analysis
When the optional
autoCapturefeature is enabled, the plugin selects conversation turns usingshouldCaptureand forwards accepted text to the configured memory service without redaction.The sensitive-content exclusion list is:
js const SENSITIVE_CAPTURE_PATTERNS = [ /\b(?:sk-[A-Za-z0-9]{16,}|aidb_[A-Za-z0-9]{8,}|ak_[A-Za-z0-9]{8,}|gh[pousr]_[A-Za-z0-9]{20,}|xox[baprs]-[A-Za-z0-9-]{10,})\b/, /-----BEGIN [A-Z ]*PRIVATE KEY-----/, /\b(?:password|passwd|api[_-]?key|secret|token|bearer)\b\s*[:=]\s*\S+/i, /\b\d{3}-\d{2}-\d{4}\b/, ];The final filtering decision is:
js if (SENSITIVE_CAPTURE_PATTERNS.some((r) => r.test(text))) { return false; } return MEMORY_TRIGGERS.some((r) => r.test(text));Generic credential labels are recognized only when immediately followed by optional whitespace and
:or=. Natural-language disclosures using “is” therefore bypass this exclusion. There is also no payment-card exclusion, despite the adjacent implementation comment explicitly identifying card numbers as content that must never be automatically captured.The automatic capture handler selects accepted turns:
js const toCapture = turns.filter((turn) => turn.text && shouldCapture(turn.text));It then stores the original text:
js const stored_ = await router.store( { text, vector: [], importance: 0.7, category }, identity, turn.role === "user" ? cfg.memory.sourceType : "agent_derivation" );For the memory-object backend, storage forwards that text to the gateway:
js const result = await this.objectDb.remember(identity, entry.text, { source_type: sourceType, });js c ...[truncated 2526 chars]
