Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    response-schema-validation-v2

    View as Markdown

    7 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: error fails a default gate, warning and info do 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.schema.model-json-parse-without-validation-ts

    Section titled “seceng.schema.model-json-parse-without-validation-ts”

    warning typescript, javascript response-schema-validation

    Model response is parsed as JSON and trusted without visible Zod/JSON 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: reads one thing reads from another.

    CWE-20 CWE-915 LLM06 LLM09 LLM05 ASI02 ASI09 MEASURE MANAGE

    seceng.schema.model-json-parse-without-validation-python

    Section titled “seceng.schema.model-json-parse-without-validation-python”

    warning python response-schema-validation

    Model response is parsed as JSON and trusted without visible Pydantic/JSON 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: reads one thing reads from another.

    CWE-20 CWE-915 LLM06 LLM09 LLM05 ASI02 ASI09 MEASURE MANAGE

    seceng.schema-model-output-controls-orm-filter

    Section titled “seceng.schema-model-output-controls-orm-filter”

    warning typescript, javascript, python response-schema-validation

    Model-generated JSON controls ORM or database filter without visible allowlist/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.

    CWE-20 CWE-639 LLM06 LLM08 LLM05 ASI02 ASI06 MEASURE MANAGE

    seceng.schema-model-output-controls-action

    Section titled “seceng.schema-model-output-controls-action”

    warning typescript, javascript, python github-actions

    Model-generated JSON controls action name, command, route, tool, or workflow transition without visible enum/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.

    CWE-20 CWE-1426 LLM06 LLM05 ASI05 ASI02 MEASURE MANAGE

    seceng.schema-openai-json-mode-without-schema

    Section titled “seceng.schema-openai-json-mode-without-schema”

    info typescript, javascript, python openai

    OpenAI JSON mode or json_object response format is used without a strict schema validation layer.

    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: trusts one party believes another without evidence.

    CWE-20 LLM09 LLM05 ASI09 MEASURE

    seceng.schema-structured-output-non-strict

    Section titled “seceng.schema-structured-output-non-strict”

    warning typescript, javascript, python response-schema-validation

    Structured output schema appears to allow additional properties or non-strict parsing for model-controlled data.

    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 LLM06 LLM05 ASI02 MEASURE

    seceng.schema-model-score-controls-security-decision

    Section titled “seceng.schema-model-score-controls-security-decision”

    warning typescript, javascript, python, java, csharp response-schema-validation

    Model-generated score/classification appears to control security, fraud, access, compliance, or approval decision without visible deterministic policy gate.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: calls one thing invokes another.

    CWE-20 CWE-285 LLM09 LLM05 ASI02 ASI09 MEASURE MANAGE