{
  "$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-code-error-schema.json",
  "title": "CodeError",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-errors-api-openapi.yml#/components/schemas/CodeError",
  "type": "object",
  "properties": {
    "errorId": {
      "type": "string",
      "description": "Unique error identifier."
    },
    "policyId": {
      "type": "string",
      "description": "Checkov policy ID that triggered the error (e.g., CKV_AWS_18)."
    },
    "policyName": {
      "type": "string",
      "description": "Human-readable name of the violated policy."
    },
    "severity": {
      "type": "string",
      "enum": [
        "CRITICAL",
        "HIGH",
        "MEDIUM",
        "LOW",
        "INFO"
      ],
      "description": "Error severity level."
    },
    "category": {
      "type": "string",
      "enum": [
        "IAC",
        "SCA",
        "SECRETS",
        "CICD"
      ],
      "description": "Error category based on the type of scan that detected it."
    },
    "status": {
      "type": "string",
      "enum": [
        "OPEN",
        "SUPPRESSED",
        "FIXED"
      ],
      "description": "Current status of the error."
    },
    "resourceName": {
      "type": "string",
      "description": "Name of the IaC resource where the error was detected."
    },
    "resourceType": {
      "type": "string",
      "description": "Type of the IaC resource."
    },
    "filePath": {
      "type": "string",
      "description": "Relative path to the file containing the error."
    },
    "fileLineRange": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "minItems": 2,
      "maxItems": 2,
      "description": "Start and end line numbers of the affected code block."
    },
    "repositoryId": {
      "type": "string",
      "description": "Repository where the error was found."
    },
    "branch": {
      "type": "string",
      "description": "Branch where the error was detected."
    },
    "guideline": {
      "type": "string",
      "description": "URL to documentation explaining the policy and remediation steps."
    },
    "firstDetected": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the error was first detected."
    },
    "lastDetected": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the most recent scan where the error was found."
    }
  }
}