{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github-enterprise/json-schema/github-enterprise-osv-vulnerability-schema.json",
  "title": "OSV Vulnerability",
  "description": "A vulnerability in OSV (Open Source Vulnerability) format",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-enterprise-enterprise-admin-api-openapi.yml#/components/schemas/osv-vulnerability",
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the vulnerability from the external system"
    },
    "schema_version": {
      "type": "string",
      "description": "The OSV schema version"
    },
    "summary": {
      "type": "string",
      "description": "A short summary of the vulnerability"
    },
    "details": {
      "type": "string",
      "description": "Detailed description of the vulnerability"
    },
    "aliases": {
      "type": "array",
      "description": "IDs for the same vulnerability in other databases. Only CVE IDs are used (to populate the vulnerability's CVE identifier); other aliases are ignored.",
      "items": {
        "type": "string"
      }
    },
    "severity": {
      "type": "array",
      "description": "Severity information for the vulnerability",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of severity scoring (e.g., CVSS_V3)"
          },
          "score": {
            "type": "string",
            "description": "The severity score or vector string"
          }
        }
      }
    },
    "affected": {
      "type": "array",
      "description": "Packages and versions affected by the vulnerability",
      "items": {
        "type": "object",
        "properties": {
          "package": {
            "type": "object",
            "properties": {
              "ecosystem": {
                "type": "string",
                "description": "The package ecosystem (e.g., npm, pip, maven)"
              },
              "name": {
                "type": "string",
                "description": "The package name"
              }
            }
          },
          "ranges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "introduced": {
                        "type": "string",
                        "description": "The version that introduced the vulnerability"
                      },
                      "fixed": {
                        "type": "string",
                        "description": "The version that fixed the vulnerability"
                      },
                      "last_affected": {
                        "type": "string",
                        "description": "The last affected version"
                      },
                      "limit": {
                        "type": "string",
                        "description": "The upper limit of the affected range"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "references": {
      "type": "array",
      "description": "URLs for more information about the vulnerability",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of reference. Supported values: PACKAGE, ADVISORY, WEB, FIX, ARTICLE, REPORT, EVIDENCE. References with other types are ignored."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The reference URL"
          }
        }
      }
    },
    "published": {
      "type": "string",
      "format": "date-time",
      "description": "When the vulnerability was first published"
    },
    "modified": {
      "type": "string",
      "format": "date-time",
      "description": "When the vulnerability was last modified"
    },
    "withdrawn": {
      "type": "string",
      "format": "date-time",
      "description": "When the vulnerability was withdrawn. If present, the vulnerability will be marked as withdrawn."
    }
  }
}