For Heads-of · Practitioner
System prompt hardening
Design and testing practice that keeps system prompts free of secrets and resilient to extraction attempts.
- preventive
- llm
- system-prompt
- hardening
What it does
Keeps credentials and sensitive business logic out of the system prompt entirely, and tests the prompt against known extraction techniques before launch.
Where it fits
Reduces both the likelihood of system-prompt-leakage and the impact if it happens anyway, since there is nothing sensitive left to leak.
Risks this mitigates
The risks this control addresses, ranked by effectiveness.
System prompt leakage
The system prompt is extracted or inferred, exposing configuration, guardrail logic, or embedded credentials.
Hidden context exposure
Content the operator assumed was hidden from the user, such as retrieval context, RAG schemas, or policy logic, is exposed or inferred through the model, beyond just the system prompt.
Framework and clause references
| Framework | Clause | Title |
|---|---|---|
| OWASP Top 10 for LLM Applications | LLM08 | Hidden Context Exposure |