{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github-enterprise/json-schema/github-enterprise-code-scanning-alert-schema.json",
  "title": "CodeScanningAlert",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-enterprise-code-scanning-api-openapi.yml#/components/schemas/CodeScanningAlert",
  "type": "object",
  "properties": {
    "number": {
      "type": "integer"
    },
    "state": {
      "type": "string",
      "enum": [
        "open",
        "closed",
        "dismissed",
        "fixed"
      ]
    },
    "rule": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "most_recent_instance": {
      "type": "object",
      "properties": {
        "ref": {
          "type": "string"
        },
        "commit_sha": {
          "type": "string"
        }
      }
    }
  }
}