Errors include context without PII
Why it matters
Error events captured with no context tell you something crashed but not who, where, or what the user was doing — making reproduction difficult and prioritization impossible. Attaching PII to error context (email addresses, full names, raw form values) violates GDPR Art. 5(1)(f) (integrity and confidentiality) and Art. 25 (data minimization by design). CWE-359 (Exposure of Private Personal Information) applies when email or identity fields are attached to error events that are stored and queryable in third-party services like Sentry. User IDs (non-identifiable UUIDs) are acceptable; email addresses are not — they link errors to identifiable individuals stored in a vendor's system.
Severity rationale
Medium because contextless errors are a productivity failure, and PII-in-errors is a GDPR data minimization violation requiring remediation before a data subject access request exposes it.
Remediation
Set user context once after authentication using only non-identifying fields, then add action context per capture.
// After user authenticates — ID only, never email or name
Sentry.setUser({ id: session.userId })
Sentry.setTag('plan', session.planTier)
For individual captures:
Sentry.withScope((scope) => {
scope.setTag('action', 'checkout.submit')
scope.setContext('cart', { itemCount: cart.items.length }) // aggregate, not raw items
Sentry.captureException(error)
})
Audit your existing Sentry user context configuration and remove any fields containing email, name, or other GDPR-covered PII.
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 Error Handling Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-359 — Exposure of Private Personal Information to an Unauthorized Actor
- gdpr · Art. 5(1)(f) — Integrity and confidentiality of personal data
- gdpr · Art. 25 — Data protection by design and by default
Taxons
History
- 2026-04-18·v1.0.0·Initial import from saas-error-handling·automated