{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/main/json-schema/palo-alto-networks-host-schema.json",
  "title": "Host",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-hosts-api-openapi.yml#/components/schemas/Host",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "Unique host identifier."
    },
    "hostname": {
      "type": "string",
      "description": "Host machine hostname."
    },
    "scanTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the most recent host scan."
    },
    "osDistro": {
      "type": "string",
      "description": "Operating system distribution."
    },
    "osDistroVersion": {
      "type": "string",
      "description": "Operating system version."
    },
    "kernelVersion": {
      "type": "string",
      "description": "Linux kernel version."
    },
    "cloudMetadata": {
      "type": "object",
      "description": "Cloud provider metadata for the host.",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "aws",
            "azure",
            "gcp",
            "oci"
          ]
        },
        "accountId": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "instanceId": {
          "type": "string"
        }
      }
    },
    "vulnerabilities": {
      "type": "array",
      "description": "Vulnerabilities discovered on the host.",
      "items": {
        "$ref": "#/$defs/Vulnerability"
      }
    },
    "vulnerabilitiesCount": {
      "type": "integer",
      "description": "Total number of vulnerabilities found."
    },
    "vulnerabilityDistribution": {
      "type": "object",
      "properties": {
        "critical": {
          "type": "integer"
        },
        "high": {
          "type": "integer"
        },
        "medium": {
          "type": "integer"
        },
        "low": {
          "type": "integer"
        }
      }
    },
    "complianceIssues": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ComplianceIssue"
      }
    },
    "complianceIssuesCount": {
      "type": "integer"
    }
  },
  "$defs": {
    "ComplianceIssue": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Compliance check ID."
        },
        "title": {
          "type": "string",
          "description": "Title of the compliance check."
        },
        "severity": {
          "type": "string",
          "enum": [
            "critical",
            "high",
            "medium",
            "low"
          ],
          "description": "Severity of the compliance issue."
        },
        "cause": {
          "type": "string",
          "description": "Explanation of why the resource failed the check."
        },
        "description": {
          "type": "string",
          "description": "Detailed description of the compliance requirement."
        }
      }
    },
    "Vulnerability": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "CVE identifier (e.g., CVE-2024-1234)."
        },
        "status": {
          "type": "string",
          "enum": [
            "fixed in",
            "needed",
            "will not fix",
            "deferred"
          ],
          "description": "Fix availability status."
        },
        "cvss": {
          "type": "number",
          "format": "float",
          "description": "CVSS v3 base score."
        },
        "severity": {
          "type": "string",
          "enum": [
            "critical",
            "high",
            "medium",
            "low"
          ],
          "description": "Severity level derived from CVSS score."
        },
        "packageName": {
          "type": "string",
          "description": "Name of the affected package."
        },
        "packageVersion": {
          "type": "string",
          "description": "Installed version of the affected package."
        },
        "fixedVersion": {
          "type": "string",
          "description": "Version that contains the fix, if available."
        },
        "link": {
          "type": "string",
          "description": "URL to the CVE advisory or details page."
        },
        "description": {
          "type": "string",
          "description": "Brief description of the vulnerability."
        },
        "publishedDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date the vulnerability was publicly disclosed."
        }
      }
    }
  }
}