other
Error
- Location
- SKILL.md:149
- Finding
- Unredacted outbound messages are disclosed to a third-party model provider<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:149-166` **Vulnerability Type**: Third-Party Data Disclosure **Risk Level**: High ### Vulnerable Code ```javascript async function evaluateWithGemini(apiKey, messageContent) { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), TIMEOUT_MS); const url = `${API_URL}/${GEMINI_MODEL}:generateContent?key=${apiKey}`; try { const response = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ systemInstruction: { parts: [{ text: GUARD_SYSTEM_PROMPT }], }, contents: [{ role: "user", parts: [{ text: `Evaluate this outbound message:\n\n${messageContent}` }], }], ``` ### Technical Analysis The handler transmits the complete outbound message to the Google Gemini API before determining whether it is safe. No local redaction, data classification, user-consent check, destination allowlist, or sensitive-data suppression is performed. The guard is specifically designed to identify leaked API keys, system prompts, model details, and internal filenames. Consequently, sensitive data that the guard is expected to block is first disclosed to the external model provider. Messages may also contain personal information, confidential business data, regulated records, or proprietary prompts. Third-party model access is relevant to the declared cloud-based classification function, but transmitting the entire message exceeds minimum data privileges when local preprocessing or a self-hosted judge could reduce disclosure. ### Attack Path 1. A user, prompt-injection payload, or compromised upstream agent causes a generated response to contain confidential data. 2. The `message:sending` hook receives the response as `data.content`. 3. The complete content is passed to `evaluateWithGemini`. 4. The handler embeds the content unchanged in ...[truncated 774 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Perform local secret and personal-data detection before any external request. 2. Redact credentials, tokens, system prompts, identifiers, and unnecessary metadata. 3. Send only the minimum text or derived features required for classification. 4. Obtain explicit operator consent and document the third-party processor, retention policy, data residency, and logging behavior. 5. Provide a self-hosted or local judge option for confidential and regulated deployments. 6. Allow administrators to disable remote classification by data class or communication channel. 7. Encrypt traffic in transit, restrict outbound connectivity to the intended API hostname, and monitor unexpected egress. 8. Avoid logging original blocked messages unless logs are access-controlled, encrypted, and governed by a retention policy. ]]>
