llm01-vendor-system-prompt-v1
6 rules · Keryn Software Licence · rules 0.8.0 · all packs
How to read a rule
- Severity
- How bad the finding is if it is real:
errorfails a default gate,warningandinfodo not. - Confidence
- P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
- False-positive risk
- low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
- Edge
- The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
- Taxonomy chips
- References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.
keryn.llm01.vendor-cohere-system-prompt-taint-py
Section titled “keryn.llm01.vendor-cohere-system-prompt-taint-py”warning python data-flow rule cohere, flask, fastapi
Request data, CLI arguments or console input reaches the preamble of a Cohere v1 chat call. The preamble replaces Cohere’s default system instructions for the whole conversation, so whoever controls it rewrites the assistant’s rules; keep the preamble constant and put caller text in message.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://docs.cohere.com/v1/reference/chat · https://www.npmjs.com/package/cohere-ai
keryn.llm01.vendor-cohere-system-prompt-taint-js
Section titled “keryn.llm01.vendor-cohere-system-prompt-taint-js”warning javascript, typescript data-flow rule cohere, express, nextjs
Request data or CLI arguments reach the preamble of a Cohere v1 chat call. The preamble replaces Cohere’s default system instructions for the whole conversation, so the caller can rewrite the assistant’s rules; keep the preamble constant and send caller text as message.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://docs.cohere.com/v1/reference/chat · https://www.npmjs.com/package/cohere-ai
keryn.llm01.vendor-ollama-system-prompt-taint-py
Section titled “keryn.llm01.vendor-ollama-system-prompt-taint-py”warning python data-flow rule ollama, flask, fastapi
Request data, CLI arguments or console input reaches the system field of an Ollama generate or create call. The system text overrides the model’s built-in system prompt, so the caller sets the highest-priority instructions; keep it constant and pass caller text as the prompt.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://docs.ollama.com/api/generate · https://pypi.org/project/ollama/
keryn.llm01.vendor-ollama-system-prompt-taint-js
Section titled “keryn.llm01.vendor-ollama-system-prompt-taint-js”warning javascript, typescript data-flow rule ollama, express, nextjs
Request data or CLI arguments reach the system field of an Ollama generate or create call. The system text overrides the model’s built-in system prompt, so the caller sets the highest-priority instructions; keep it constant and pass caller text as the prompt.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://docs.ollama.com/api/generate · https://pypi.org/project/ollama/
keryn.llm01.vendor-openai-assistants-system-prompt-taint-py
Section titled “keryn.llm01.vendor-openai-assistants-system-prompt-taint-py”warning python data-flow rule openai, flask, fastapi
Request data, CLI arguments or console input reaches the instructions of an OpenAI Assistant or Run (assistants.create/update, runs.create, additional_instructions). Assistant instructions act as the system prompt for every thread that uses it, and a persisted assistant carries a caller’s text to other users; keep instructions server-side and send caller text as a thread message.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://developers.openai.com/api/reference/resources/beta/subresources/assistants/methods/create · https://developers.openai.com/api/reference/resources/beta/subresources/threads/subresources/runs/methods/create · https://www.npmjs.com/package/openai
keryn.llm01.vendor-openai-assistants-system-prompt-taint-js
Section titled “keryn.llm01.vendor-openai-assistants-system-prompt-taint-js”warning javascript, typescript data-flow rule openai, express, nextjs
Request data or CLI arguments reach the instructions of an OpenAI Assistant or Run (assistants.create/update, runs.create, additional_instructions). Assistant instructions act as the system prompt for every thread that uses it, and a persisted assistant carries a caller’s text to other users; keep instructions server-side and send caller text as a thread message.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
Fix: Keep the system prompt a server-side constant and send caller text only as a user message. If the caller may choose a persona or language, validate it against a fixed allow-list and map it to a prewritten prompt snippet.
References: https://developers.openai.com/api/reference/resources/beta/subresources/assistants/methods/create · https://developers.openai.com/api/reference/resources/beta/subresources/threads/subresources/runs/methods/create · https://www.npmjs.com/package/openai