{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "$id": "sink-search.schema.json",
  "title": "Sink search record",
  "required": [
    "schema_version",
    "run_id",
    "probe_id",
    "hop_id",
    "forms_searched",
    "raw_hits",
    "encoded_hits",
    "marker_hits",
    "verdict",
    "marker_classes"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0.0"
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "probe_id": {
      "type": "string",
      "minLength": 1
    },
    "hop_id": {
      "type": "string",
      "minLength": 1
    },
    "forms_searched": {
      "type": "array",
      "minItems": 4,
      "items": {
        "enum": [
          "raw",
          "url",
          "base64",
          "hex"
        ]
      }
    },
    "raw_hits": {
      "const": 0
    },
    "encoded_hits": {
      "const": 0
    },
    "marker_hits": {
      "type": "integer",
      "minimum": 1
    },
    "verdict": {
      "enum": [
        "PASS",
        "FAIL",
        "BLOCKED"
      ]
    },
    "marker_classes": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "enum": [
          "cookie",
          "authorization",
          "ordinary-csrf",
          "refresh-csrf",
          "password",
          "reset-token",
          "csrf-response",
          "refresh-csrf-response"
        ]
      }
    }
  }
}
