{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.",
  "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
  "choices": [
    "Sanitized HTML",
    "Raw external HTML",
    "Text or constant",
    "Review"
  ],
  "actions": {
    "Sanitized HTML": {
      "action": "preview_jev_html_sanitization_path",
      "payload": {
        "decision": "Sanitized HTML"
      },
      "pending": true
    },
    "Raw external HTML": {
      "action": "preview_jev_html_sanitization_path",
      "payload": {
        "decision": "Raw external HTML"
      },
      "pending": true
    },
    "Text or constant": {
      "action": "preview_jev_html_sanitization_path",
      "payload": {
        "decision": "Text or constant"
      },
      "pending": true
    },
    "Review": {
      "action": "preview_jev_html_sanitization_path",
      "payload": {
        "decision": "Review"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "CMS text in a raw sink",
      "expected": "Raw external HTML",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"External CMS content.\",\n    \"path\": \"Passed directly to a raw HTML insertion API.\",\n    \"contract\": \"Complete path has no sanitization; a type check only confirms it is a string.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Explicit sanitizer path",
      "expected": "Sanitized HTML",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"External rich-text HTML.\",\n    \"path\": \"Sanitize, then insert that unchanged result through the raw HTML sink.\",\n    \"contract\": \"A supplied suitable sanitizer configuration removes disallowed markup and attributes; no later unsafe changes occur.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Framework text node",
      "expected": "Text or constant",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"External comment text.\",\n    \"path\": \"Rendered as a normal escaped text node, not a raw HTML API.\",\n    \"contract\": \"The framework treats the value as text; no later raw insertion occurs.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Trusted static markup",
      "expected": "Text or constant",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"Fixed reviewed markup literal in the application source.\",\n    \"path\": \"Rendered as HTML.\",\n    \"contract\": \"No external or runtime data is combined with the literal.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Unknown clean helper",
      "expected": "Review",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"External HTML.\",\n    \"path\": \"clean(content), then raw HTML insertion.\",\n    \"contract\": \"The helper implementation and configuration are not supplied.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Raw content appended afterward",
      "expected": "Raw external HTML",
      "request": {
        "context": "{\n  \"task\": \"Defensively classify the path from external content to a DOM sink using explicit transformation and sanitization contracts.\",\n  \"evidence\": {\n    \"source\": \"External HTML fragments.\",\n    \"path\": \"Sanitize fragment A, then append unsanitized external fragment B and insert the result as raw HTML.\",\n    \"contract\": \"Complete path has no sanitization after the append.\"\n  }\n}",
        "question": "Review the source-to-DOM path. Sanitized HTML means external content is sanitized by an explicit suitable contract before raw HTML insertion, with no later unsafe transformation. Raw external HTML means it reaches a raw HTML sink with no sanitization in the complete path. Text or constant means escaped text rendering or a fixed trusted literal. Review takes precedence for missing/conflicting sanitizer, transformation or sink facts. A string schema is not sanitization. Do not execute HTML.",
        "choices": [
          "Sanitized HTML",
          "Raw external HTML",
          "Text or constant",
          "Review"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
