No user data sent to external error reporting services
Why it matters
GDPR Article 28 requires that sub-processors (including error monitoring services) process data only as instructed by the controller and under a Data Processing Agreement. CWE-532 and OWASP A09 both cover sensitive data ending up in log outputs. Error monitoring services like Sentry, LogRocket, and Datadog are third parties with their own retention policies, access controls, and breach surfaces — often less stringent than your primary database. When a developer attaches the full AI messages array to a Sentry error for debugging convenience, they have just disclosed every user message in that request to a third party that was not disclosed in the privacy policy for that purpose.
Severity rationale
High because attaching prompt content to error reports constitutes an undisclosed disclosure to an additional third-party sub-processor in violation of GDPR Art. 28, compounding the data exposure beyond the intended AI provider.
Remediation
Sanitize error context before passing it to external error reporters. Log only metadata that helps debug the failure — not the content that caused it.
try {
const response = await openai.chat.completions.create({ model: 'gpt-4o', messages })
} catch (error) {
// Safe — only metadata:
Sentry.captureException(error, {
extra: {
context: 'AI generation failed',
model: 'gpt-4o',
messageCount: messages.length,
// NOT: prompt, messages, userInput, req.body
}
})
throw error
}
Audit every captureException, captureEvent, and addBreadcrumb call in your AI pipeline. Create a lint rule or code review checklist item that prohibits messages, prompt, or userInput as error reporter context keys.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the AI Data Privacy Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- gdpr · Art. 28 — Processor — controlling onward transfer to sub-processors
- cwe · CWE-532 — Insertion of Sensitive Information into Log File
- owasp:2021 · A09 — Security Logging and Monitoring Failures
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-data-privacy·automated