{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "fingerprintVersion",
    "scannerVersion",
    "createdAt",
    "configHash",
    "files",
    "rules",
    "projects",
    "limitations",
    "inactive",
    "findings"
  ],
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "fingerprintVersion": {
      "const": 2
    },
    "scannerVersion": {
      "type": "string",
      "minLength": 1
    },
    "createdAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d{3}Z$"
    },
    "configHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "inactive": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      },
      "uniqueItems": true
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fingerprint",
          "rule",
          "file",
          "severity",
          "confidence"
        ],
        "properties": {
          "fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "rule": {
            "type": "string",
            "minLength": 1
          },
          "file": {
            "type": "string",
            "minLength": 1
          },
          "severity": {
            "enum": [
              "info",
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "confidence": {
            "enum": [
              "low",
              "medium",
              "high"
            ]
          }
        }
      }
    }
  }
}
