Case 066DE6 · AI security · L2 Practitioner
The Bot Revealed Its System Prompt
Live alertA user posts a screenshot showing your support chatbot reciting its full system prompt. It includes an internal API key the bot uses to look up orders, and the instruction "never show refunds over $500 to users who are not managers".
Interview questionYour chatbot leaked a system prompt that contains an API key and a business rule. What do you do?
- 01 What happened?
- 02 What is the impact?
- 03 What do you do?
What a strong answer covers
Try it out loud first. Then check yourself:
- Rotate the API key now and check its logs for use from anywhere other than the bot.
- Treat system prompts as public (OWASP LLM07): secrets belong in server-side code, called by the app, never in the prompt.
- The refund rule is access control: enforce it in the backend using the real user's role, not as an instruction to the model.
- Review other prompts for secrets and rules, and add tests that try to extract the prompt before each release.
If the interviewer pushes back
- Why is "add an instruction telling the model never to reveal its prompt" not a fix?