AI provider API calls use encrypted transport
Why it matters
GDPR Article 32 requires that personal data be transmitted with appropriate technical security measures — which universally means TLS encryption. CWE-319 (Cleartext Transmission of Sensitive Information) and OWASP A02 (Cryptographic Failures) both apply when AI prompt data travels over unencrypted HTTP. AI prompts contain user input in its rawest form: questions, documents, instructions, and frequently PII the user embedded without realizing it. Any network observer on the path between your server and the AI provider endpoint — a misconfigured proxy, a shared hosting environment, a compromised network hop — can read every prompt in plaintext. NIST SP 800-53 Rev. 5 SC-8 mandates transmission confidentiality as a baseline control.
Severity rationale
Critical because HTTP-transmitted AI prompts expose user content to any network observer between server and provider, constituting cleartext PII transmission in violation of GDPR Art. 32, CWE-319, and OWASP A02.
Remediation
Ensure any custom baseURL configured in your AI client starts with https://. Official SDK default endpoints are already HTTPS — only custom or self-hosted endpoints need verification.
// Correct:
const openai = new OpenAI({
baseURL: 'https://your-proxy.example.com/v1',
apiKey: process.env.OPENAI_API_KEY
})
// Wrong — never in production:
const openai = new OpenAI({
baseURL: 'http://your-proxy.example.com/v1',
})
For local development mocks (Ollama, LM Studio), guard the HTTP URL behind a NODE_ENV check so it cannot accidentally reach production:
const openai = new OpenAI({
baseURL: process.env.NODE_ENV === 'development'
? 'http://localhost:11434/v1'
: 'https://api.openai.com/v1'
})
Verify by searching the codebase for http:// (not https://) in any string adjacent to AI client configuration.
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
- cwe · CWE-319 — Cleartext Transmission of Sensitive Information
- owasp:2021 · A02 — Cryptographic Failures
- gdpr · Art. 32 — Security of processing — encryption in transit
- nist:rev5 · SC-8 — Transmission confidentiality and integrity
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-data-privacy·automated