{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onyphe/json-schema/onyphe-ctiscan-document-schema.json",
  "title": "CtiscanDocument",
  "description": "**ctiscan / ctiurl data model** (IP enrichment and CTI). Layered, one document\nper service (`ctiscan`) or URL (`ctiurl`). Only the most-used layers are listed;\n`additionalProperties` is true. Single-field values are often arrays.\n",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onyphe-openapi.yml#/components/schemas/CtiscanDocument",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "@category": {
      "type": "string",
      "enum": [
        "ctiscan",
        "ctiurl"
      ]
    },
    "@timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "seen_date": {
      "type": "string",
      "format": "date"
    },
    "tag": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "string"
    },
    "ip": {
      "type": "object",
      "description": "Scanned address and its network context.",
      "additionalProperties": true,
      "properties": {
        "dest": {
          "type": "string",
          "description": "Scanned IP address."
        },
        "asn": {
          "type": "string"
        },
        "organization": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "subnet": {
          "type": "string"
        },
        "netname": {
          "type": "string"
        }
      }
    },
    "tcp": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "dest": {
          "type": "integer",
          "description": "Port of this service."
        }
      }
    },
    "services": {
      "type": "object",
      "description": "Every open port seen on the host.",
      "additionalProperties": true,
      "properties": {
        "port": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Port numbers as strings (\"443\")."
        }
      }
    },
    "app": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "protocol": {
          "type": "string"
        },
        "device": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tls": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ],
          "description": "String, not a JSON boolean."
        },
        "data": {
          "type": "object",
          "description": "Raw application response, up to ~1 MB.",
          "additionalProperties": true,
          "properties": {
            "text": {
              "type": "string"
            },
            "length": {
              "type": "integer"
            },
            "md5": {
              "type": "string"
            }
          }
        }
      }
    },
    "component": {
      "type": "object",
      "description": "Detected products, vendors, versions and CPEs.",
      "additionalProperties": true,
      "properties": {
        "cpe": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "product": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "vendor": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "version": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "http": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": "integer"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "html": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "title": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "description": "Full-text."
            },
            "raw": {
              "type": "string",
              "description": "Exact/regexp."
            }
          }
        }
      }
    },
    "cert": {
      "type": "object",
      "additionalProperties": true,
      "description": "Certificate layer (subject, issuer, serial, fingerprints, validity)."
    },
    "dns": {
      "type": "object",
      "additionalProperties": true,
      "description": "Forward and reverse DNS."
    },
    "favicon": {
      "type": "object",
      "additionalProperties": true
    },
    "compat": {
      "type": "object",
      "additionalProperties": true,
      "description": "Mirrors some datascan names to ease porting. Query-side names are still `compat.*`."
    },
    "scanner": {
      "type": "object",
      "additionalProperties": true
    },
    "trackquery": {
      "type": "string"
    }
  }
}