Scan rule · RSC-SEC-083
System prompt in the shipped code
Checks whether the instruction steering an AI assistant is shipped in the browser code.
Why this matters
The system prompt is the actual product work behind an AI feature: tone, rules, limits, examples. Shipped in the client, any visitor can read it — and anyone wanting to clone the product skips the part that took time.
It is also a security matter: prompt injection is guesswork while the rules are unknown, and craft once they are visible. Someone who knows the prompt says “never quote below €100” can aim at exactly that.
The finding also says something about the architecture: a prompt in the client means the AI call comes from the browser. Then the key sits there too, or behind a proxy without access control — we check both separately (RSC-SEC-034, RSC-SEC-021).
Scan tier
How to fix it
Move the system prompt to the server. The browser only sends the user input to your own endpoint, which holds prompt and key.