llm01-prompt-injection
8 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.
seceng.llm01.prompt-injection-taint
Section titled “seceng.llm01.prompt-injection-taint”error python data-flow rule llm01-prompt-injection
Potential prompt injection detected. User-controlled input flows into an LLM prompt via string concatenation or template literals without apparent sanitization.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.prompt-injection-taint-js
Section titled “seceng.llm01.prompt-injection-taint-js”warning javascript, typescript data-flow rule llm01-prompt-injection
User-controlled input flows into an LLM prompt in JavaScript/TypeScript without sanitization.
Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.python-concat-prompt
Section titled “seceng.llm01.python-concat-prompt”warning python llm01-prompt-injection
User or external input is concatenated directly into an LLM prompt string.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.js-ts-concat-prompt
Section titled “seceng.llm01.js-ts-concat-prompt”warning javascript, typescript llm01-prompt-injection
User or external input is concatenated directly into an LLM prompt string.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.langchain-sink-injection
Section titled “seceng.llm01.langchain-sink-injection”warning python data-flow rule langchain
User-controlled input flows into a LangChain chain or agent invocation.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
CWE-77 CWE-20 LLM01 ASI01 ASI02
seceng.llm01.llamaindex-sink-injection
Section titled “seceng.llm01.llamaindex-sink-injection”warning python data-flow rule llamaindex
User-controlled input flows into a LlamaIndex query or chat engine.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.trusted-dev-prompt-suppression
Section titled “seceng.llm01.trusted-dev-prompt-suppression”info python llm01-prompt-injection
Prompt sourced from environment variable or config object.
Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).
seceng.llm01.openai-assistants-thread-injection
Section titled “seceng.llm01.openai-assistants-thread-injection”warning javascript, typescript data-flow rule openai
User-controlled content injected into OpenAI Assistants thread.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).