{
  "$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-types-compliance-stats-schema.json",
  "title": "types.ComplianceStats",
  "description": "ComplianceStats holds compliance data",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-stats-api-openapi.yml#/components/schemas/types.ComplianceStats",
  "properties": {
    "categories": {
      "description": "Compliance stats by category.\n",
      "items": {
        "$ref": "#/$defs/types.ComplianceCategoryStats"
      },
      "type": "array"
    },
    "daily": {
      "description": "Daily compliance stats.\n",
      "items": {
        "$ref": "#/$defs/types.ComplianceDailyStats"
      },
      "type": "array"
    },
    "ids": {
      "description": "Compliance data by check ID.\n",
      "items": {
        "$ref": "#/$defs/types.ComplianceIDStats"
      },
      "type": "array"
    },
    "rules": {
      "description": "Compliance stats by policy rules.\n",
      "items": {
        "$ref": "#/$defs/types.RuleComplianceStats"
      },
      "type": "array"
    },
    "templates": {
      "description": "Compliance stats by template.\n",
      "items": {
        "$ref": "#/$defs/types.ComplianceTemplateStats"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "common.PolicyType": {
      "description": "PolicyType represents the type of the policy",
      "enum": [
        [
          "containerVulnerability",
          "containerCompliance",
          "ciImagesVulnerability",
          "ciImagesCompliance",
          "hostVulnerability",
          "hostCompliance",
          "vmVulnerability",
          "vmCompliance",
          "serverlessCompliance",
          "ciServerlessCompliance",
          "serverlessVulnerability",
          "ciServerlessVulnerability",
          "containerRuntime",
          "appEmbeddedRuntime",
          "containerAppFirewall",
          "hostAppFirewall",
          "outOfBandAppFirewall",
          "agentlessAppFirewall",
          "serverObserverAppFirewall",
          "appEmbeddedAppFirewall",
          "serverlessAppFirewall",
          "networkFirewall",
          "secrets",
          "hostRuntime",
          "serverlessRuntime",
          "kubernetesAudit",
          "trust",
          "admission",
          "codeRepoCompliance",
          "ciCodeRepoCompliance",
          "ciCodeRepoVulnerability",
          "codeRepoVulnerability"
        ]
      ],
      "type": "string"
    },
    "types.ComplianceCategoryStats": {
      "description": "ComplianceCategoryStats holds data regarding a compliance category",
      "properties": {
        "failed": {
          "description": "Failed is the count of impacted resources by the category IDs.\n",
          "type": "integer"
        },
        "name": {
          "$ref": "#/$defs/vuln.ComplianceCategory"
        },
        "total": {
          "description": "Total is the count of evaluations of category IDs.\n",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "types.ComplianceDailyStats": {
      "description": "ComplianceDailyStats is the compliance daily stats",
      "properties": {
        "_id": {
          "description": "Date holds the date the data was collected.\n",
          "type": "string"
        },
        "distribution": {
          "$ref": "#/$defs/vuln.Distribution"
        },
        "modified": {
          "description": "Modified is the time the data was modified.\n",
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object"
    },
    "types.ComplianceIDStats": {
      "description": "ComplianceIDStats holds data regarding applied compliance ID",
      "properties": {
        "benchmarkID": {
          "description": "BenchmarkID is the benchmark ID.\n",
          "type": "string"
        },
        "category": {
          "$ref": "#/$defs/vuln.ComplianceCategory"
        },
        "description": {
          "description": "Description is the compliance description.\n",
          "type": "string"
        },
        "failed": {
          "description": "Failed is the number of occurrences of compliance ID in resources.\n",
          "type": "integer"
        },
        "id": {
          "description": "ID is the compliance ID.\n",
          "type": "integer"
        },
        "severity": {
          "description": "Severity is the compliance severity.\n",
          "type": "string"
        },
        "templateTitle": {
          "description": "TemplateTitle is the template title.\n",
          "type": "string"
        },
        "total": {
          "description": "Total is the count of resources evaluated with the compliance.\n",
          "type": "integer"
        },
        "type": {
          "$ref": "#/$defs/vulnerability.Type"
        }
      },
      "type": "object"
    },
    "types.ComplianceTemplateStats": {
      "description": "ComplianceTemplateStats holds data regarding a compliance template",
      "properties": {
        "failed": {
          "description": "Failed is the count of impacted resources by the template IDs.\n",
          "type": "integer"
        },
        "name": {
          "$ref": "#/$defs/vuln.ComplianceTemplate"
        },
        "total": {
          "description": "Total is the count of evaluations of template IDs.\n",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "types.RuleComplianceStats": {
      "description": "RuleComplianceStats holds data regarding applied compliance rule",
      "properties": {
        "failed": {
          "description": "Failed is the count of the rule compliance IDs in resources.\n",
          "type": "integer"
        },
        "name": {
          "description": "Name is the name of the applied rule.\n",
          "type": "string"
        },
        "policyType": {
          "$ref": "#/$defs/common.PolicyType"
        },
        "total": {
          "description": "Total is the count of evaluations done by rule.\n",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "vuln.ComplianceCategory": {
      "description": "ComplianceCategory represents the compliance category",
      "enum": [
        [
          "Docker",
          "Docker (DISA STIG)",
          "Twistlock Labs",
          "Custom",
          "Istio",
          "Linux",
          "Kubernetes",
          "CRI",
          "OpenShift",
          "Application Control",
          "GKE",
          "Prisma Cloud Labs",
          "EKS",
          "AKS"
        ]
      ],
      "type": "string"
    },
    "vuln.ComplianceTemplate": {
      "description": "ComplianceTemplate represents the compliance template",
      "enum": [
        [
          "PCI",
          "HIPAA",
          "NIST SP 800-190",
          "GDPR",
          "DISA STIG"
        ]
      ],
      "type": "string"
    },
    "vuln.Distribution": {
      "description": "Distribution counts the number of vulnerabilities per type",
      "properties": {
        "critical": {
          "description": ".\n",
          "type": "integer"
        },
        "high": {
          "description": ".\n",
          "type": "integer"
        },
        "low": {
          "description": ".\n",
          "type": "integer"
        },
        "medium": {
          "description": ".\n",
          "type": "integer"
        },
        "total": {
          "description": ".\n",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "vulnerability.Type": {
      "description": "Type represents the vulnerability type",
      "enum": [
        [
          "container",
          "image",
          "host_config",
          "daemon_config",
          "daemon_config_files",
          "security_operations",
          "k8s_master",
          "k8s_worker",
          "k8s_federation",
          "linux",
          "windows",
          "istio",
          "serverless",
          "custom",
          "docker_stig",
          "openshift_master",
          "openshift_worker",
          "application_control_linux",
          "gke_worker",
          "image_malware",
          "host_malware",
          "aks_worker",
          "eks_worker",
          "image_secret",
          "host_secret"
        ]
      ],
      "type": "string"
    }
  }
}