Never trust model output as code truth
Sanitize HTML. Do not eval model text. Treat tool calls like untrusted user input.
Keep secrets off the prompt
API keys belong in server env vars. Pasting secrets into chat logs is an incident waiting to happen.
Prompt injection is social engineering
If your app forwards user content into a system prompt, attackers will try to override instructions. Isolate privileges and validate actions server-side.
#security#llm#owasp