{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aisciencetracker.org/schema/vulnerabilities.schema.json",
  "title": "AI Science Tracker AI-discovered vulnerability records",
  "description": "Array of individual public findings. Field meanings: docs/vulnerability-schema.md. Licensed CC BY 4.0.",
  "type": "array",
  "items": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "title",
      "product",
      "ai_system",
      "organization",
      "summary",
      "ai_role",
      "disclosure_date",
      "ai_attribution_date",
      "classification",
      "classification_note",
      "cves",
      "source_url",
      "ai_source_url",
      "remediation",
      "remediation_note",
      "advisory_url",
      "checked_date"
    ],
    "properties": {
      "id": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9_-]*$"
      },
      "title": {
        "type": "string",
        "minLength": 1
      },
      "product": {
        "type": "string",
        "minLength": 1
      },
      "ai_system": {
        "type": "string",
        "minLength": 1
      },
      "organization": {
        "type": "string",
        "minLength": 1
      },
      "summary": {
        "type": "string",
        "minLength": 1
      },
      "ai_role": {
        "type": "string",
        "minLength": 1
      },
      "disclosure_date": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "ai_attribution_date": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "classification": {
        "type": "string",
        "enum": [
          "undisclosed",
          "pre-release",
          "disclosure"
        ]
      },
      "classification_note": {
        "type": "string",
        "minLength": 1
      },
      "cves": {
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^CVE-\\d{4}-\\d{4,}$"
        }
      },
      "source_url": {
        "type": "string",
        "pattern": "^https://\\S+$"
      },
      "ai_source_url": {
        "type": "string",
        "pattern": "^https://\\S+$"
      },
      "remediation": {
        "type": "string",
        "enum": [
          "fix documented",
          "not established"
        ]
      },
      "remediation_note": {
        "type": "string",
        "minLength": 1
      },
      "advisory_url": {
        "type": "string",
        "pattern": "^https://\\S+$"
      },
      "checked_date": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "cvss": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "cve",
            "version",
            "score",
            "vector",
            "source_url",
            "source_name",
            "checked_date"
          ],
          "properties": {
            "cve": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^CVE-\\d{4}-\\d{4,}$"
            },
            "version": {
              "type": "string",
              "enum": [
                "2.0",
                "3.0",
                "3.1",
                "4.0"
              ]
            },
            "score": {
              "type": "number",
              "minimum": 0,
              "maximum": 10
            },
            "vector": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1
            },
            "source_url": {
              "type": "string",
              "pattern": "^https://\\S+$"
            },
            "source_name": {
              "type": "string",
              "minLength": 1
            },
            "checked_date": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "scenarios": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      },
      "impacts": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "cves",
            "consequences",
            "conditions",
            "exploitation",
            "source_url",
            "checked_date"
          ],
          "properties": {
            "cves": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^CVE-\\d{4}-\\d{4,}$"
              }
            },
            "consequences": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "code execution",
                  "data disclosure",
                  "data modification",
                  "privilege escalation",
                  "denial of service",
                  "authentication bypass",
                  "other"
                ]
              }
            },
            "conditions": {
              "type": "string",
              "minLength": 1
            },
            "exploitation": {
              "type": "string",
              "minLength": 1
            },
            "source_url": {
              "type": "string",
              "pattern": "^https://\\S+$"
            },
            "checked_date": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        }
      }
    }
  }
}
