{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.specset.com/fedramp/certification-data.schema.json",
  "title": "Specset Certification Data index (provider-defined, not a FedRAMP schema)",
  "description": "index.json in gs://specset-prod-certification-data: every file a reader can retrieve, with its SHA-256. Written by fedramp/certification_data.py.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "fedRampId", "generatedAt", "bucket", "documentation", "trustCenter", "resources", "vulnerabilityActivity"],
  "properties": {
    "schemaVersion": { "const": "1.0" },
    "fedRampId": { "const": "FR2631258135" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "bucket": { "const": "specset-prod-certification-data" },
    "documentation": { "type": "string", "format": "uri" },
    "trustCenter": { "type": "string", "format": "uri" },
    "resources": {
      "description": "Every requestable trust-center file, byte for byte as the trust center holds it.",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "title", "description", "trustCenterUrl", "lastUpdated", "mediaType", "bytes", "sha256", "object"],
        "properties": {
          "id": { "type": "string", "pattern": "^[0-9a-f]{24}$" },
          "title": { "type": "string", "minLength": 1 },
          "description": { "type": "string" },
          "trustCenterUrl": { "type": "string", "format": "uri" },
          "lastUpdated": { "type": ["string", "null"] },
          "mediaType": { "enum": ["application/pdf", "application/json", "text/plain; charset=utf-8", "application/octet-stream"] },
          "bytes": { "type": "integer", "minimum": 1 },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
          "object": { "type": "string", "pattern": "^resources/[0-9a-f]{24}/[0-9a-f]{64}\\.(pdf|json|txt|bin)$" }
        }
      }
    },
    "vulnerabilityActivity": {
      "description": "Historical vulnerability detection and response activity (VER-TFR-MRH), one edition per 14-day window, newest first.",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["from", "to", "publishedAt", "bytes", "sha256", "object"],
        "properties": {
          "from": { "type": "string", "format": "date-time" },
          "to": { "type": "string", "format": "date-time" },
          "publishedAt": { "type": "string", "format": "date-time" },
          "bytes": { "type": "integer", "minimum": 1 },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
          "object": { "type": "string", "pattern": "^vulnerability-activity/[0-9TZ]+_[0-9TZ]+/historical-ver-activity\\.json$" }
        }
      }
    }
  }
}
