stream-output-safety-v2
5 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.stream.sse-direct-llm-stream-no-filter-ts
Section titled “seceng.stream.sse-direct-llm-stream-no-filter-ts”info typescript, javascript stream-output-safety
LLM streaming output is sent to SSE/HTTP response without visible moderation, escaping, filtering, timeout, or cancellation.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: sends data leaves for another party.
CWE-79 CWE-116 CWE-770 LLM05 LLM10 ASI08 ASI07 MEASURE MANAGE
seceng.stream.websocket-direct-llm-output
Section titled “seceng.stream.websocket-direct-llm-output”info typescript, javascript, python, java, csharp stream-output-safety
LLM output is sent directly over WebSocket without visible filtering, escaping, or policy checks.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: sends data leaves for another party.
CWE-79 CWE-116 LLM05 ASI06 MEASURE MANAGE
seceng.stream-html-markdown-raw-stream
Section titled “seceng.stream-html-markdown-raw-stream”warning typescript, javascript, python stream-output-safety
Streaming Markdown/HTML output appears to be rendered raw or passed to client before sanitization.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-79 LLM05 ASI05 MEASURE MANAGE
seceng.stream-partial-json-command-execution
Section titled “seceng.stream-partial-json-command-execution”warning typescript, javascript, python stream-output-safety
Partial streaming JSON or tool output appears to trigger commands/actions before complete schema validation.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-20 CWE-1426 LLM06 LLM05 ASI05 ASI02 MEASURE MANAGE
seceng.stream-sensitive-token-leak
Section titled “seceng.stream-sensitive-token-leak”warning typescript, javascript, python, java, csharp stream-output-safety
Streaming code may emit internal tokens, tool args, prompt fragments, or reasoning/scratchpad fields.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: reads one thing reads from another.