System prompt includes PII safety instructions
Why it matters
OWASP LLM01 (Prompt Injection) attackers often use injected instructions to extract or reproduce PII that has been provided in the conversation context. Adding behavioral guardrails to the system prompt — "do not repeat personal information the user shares" — reduces the surface area for accidental PII regurgitation. NIST AI RMF MANAGE 2.2 calls for implementing controls to minimize AI-generated harm. While system prompt instructions are not a technical security control and can be overridden by adversarial prompts, they meaningfully reduce accidental PII generation from normal interactions and demonstrate a documented intent to protect user data.
Severity rationale
Low because system prompt instructions are a behavioral rather than technical control, but their absence leaves the AI with no documented guidance on PII handling — increasing accidental disclosure risk in normal usage.
Remediation
Add explicit PII safety instructions to your system prompt constant in lib/ai/ or wherever your system prompt is defined.
// lib/ai/system-prompt.ts
export const SYSTEM_PROMPT = `You are a helpful assistant for [App Name].
Privacy guidelines:
- Do not ask users for personal information (email, phone, address, SSN, etc.)
- If a user shares personal information, do not repeat it back or include it in your response
- If asked to generate personal information about real individuals, decline politely
- Focus responses on the task without referencing identifying details the user may have shared`
Store the system prompt as a versioned constant so changes are tracked in version control. For higher-risk applications, add domain-specific prohibitions (e.g., "Do not provide medical diagnoses" or "Do not discuss specific account balances").
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
- owasp-llm:2025 · LLM01 — Prompt Injection — system prompt guardrails
- nist-ai-rmf:1.0 · MANAGE 2.2 — Mechanisms for managing AI risks including behavioural guardrails
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-data-privacy·automated