llm-framework-risks
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.
seceng.llm-frameworks.python-langchain-prompt-injection-validation-disabled
Section titled “seceng.llm-frameworks.python-langchain-prompt-injection-validation-disabled”warning python langchain
LangChain PromptTemplate has validation disabled. This can allow malformed or malicious templates to be used, increasing the risk of prompt injection.
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.llm-frameworks.js-ts-langchain-prompt-injection-validation-disabled
Section titled “seceng.llm-frameworks.js-ts-langchain-prompt-injection-validation-disabled”warning javascript, typescript langchain
LangChain PromptTemplate has validation disabled. This can allow malformed or malicious templates to be used.
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.llm-frameworks.python-langchain-unsafe-tool
Section titled “seceng.llm-frameworks.python-langchain-unsafe-tool”error python langchain
Use of unsafe LangChain tools like PythonAstREPLTool or ShellTool. These tools allow the model to execute arbitrary code on the host.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: calls one thing invokes another.
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as agent/tools.py and scan it with keryn scan agent --verbose; the finding below appears.
from langchain.agents import AgentExecutor, create_tool_calling_agentfrom langchain_community.tools import ShellToolfrom langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o-mini")shell = ShellTool()
def build_agent(prompt): agent = create_tool_calling_agent(llm, [shell], prompt) return AgentExecutor(agent=agent, tools=[shell])Checked with Keryn’s browser engine when this page was built: it reports seceng.llm-frameworks.python-langchain-unsafe-tool at line 6 (error, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.
seceng.llm-frameworks.js-ts-langchain-unsafe-tool
Section titled “seceng.llm-frameworks.js-ts-langchain-unsafe-tool”error javascript, typescript langchain
Use of unsafe LangChain tools. These tools allow the model to execute arbitrary code on the host.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: calls one thing invokes another.
seceng.llm-frameworks.llamaindex-insecure-storage
Section titled “seceng.llm-frameworks.llamaindex-insecure-storage”info python, javascript, typescript llamaindex
LlamaIndex data is being persisted to local storage without encryption or obvious access controls.
Confidence P0: exploitable as written.
Edge inspected: writes one thing writes to another.
seceng.llm-frameworks.dspy-signature-leakage
Section titled “seceng.llm-frameworks.dspy-signature-leakage”info python llm-framework-risks
DSPy Signature or Module is being converted to a string or dictionary in a way that might be exposed to users or logs.
Confidence P0: exploitable as written. 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).