{
  "product": "BLACKPROOF",
  "apiVersion": "blackproof-public-api-v0.1.0-alpha",
  "resource": "proofpack-schema",
  "posture": {
    "publicSurface": true,
    "defaultMode": "lecture-seule",
    "noUploadByDefault": true,
    "sensitiveEvidenceAccepted": false
  },
  "disclaimer": "BLACKPROOF structure des dossiers de preuve cyber. L'API publique ne fournit ni certification, ni avis juridique, ni audit qualifié, ni garantie de conformité réglementaire.",
  "version": "blackproof-method-v0.1.0-alpha",
  "contentType": "application/schema+json",
  "schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://blackproof.fr/api/proofpack/schema.json",
    "title": "BLACKPROOF ProofPack",
    "description": "Machine-readable cyber evidence dossier generated by BLACKPROOF.",
    "type": "object",
    "additionalProperties": false,
    "required": [
      "id",
      "case",
      "questions",
      "evidence",
      "debts",
      "summary",
      "methodVersion",
      "generatedAt",
      "fingerprint"
    ],
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1
      },
      "case": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "framework",
          "createdAt",
          "updatedAt",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "companyName": {
            "type": "string"
          },
          "clientName": {
            "type": "string"
          },
          "framework": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "enum": [
              "draft",
              "ready",
              "exported"
            ]
          }
        }
      },
      "questions": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/question"
        }
      },
      "evidence": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/evidence"
        }
      },
      "debts": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/debt"
        }
      },
      "summary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "questionCount",
          "evidenceCount",
          "proofDebtCount",
          "criticalDebtCount",
          "highDebtCount",
          "proofDebtScore"
        ],
        "properties": {
          "questionCount": {
            "type": "integer",
            "minimum": 0
          },
          "evidenceCount": {
            "type": "integer",
            "minimum": 0
          },
          "proofDebtCount": {
            "type": "integer",
            "minimum": 0
          },
          "criticalDebtCount": {
            "type": "integer",
            "minimum": 0
          },
          "highDebtCount": {
            "type": "integer",
            "minimum": 0
          },
          "proofDebtScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "methodVersion": {
        "type": "string",
        "const": "blackproof-method-v0.1.0-alpha"
      },
      "generatedAt": {
        "type": "string",
        "format": "date-time"
      },
      "fingerprint": {
        "type": "string",
        "pattern": "^bp_sha256_[a-f0-9]{64}$"
      }
    },
    "$defs": {
      "question": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "caseId",
          "text",
          "category",
          "criticality",
          "mappedRequirements",
          "suggestedAnswer",
          "evidenceIds",
          "confidence"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "caseId": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "$ref": "#/$defs/proofCategory"
          },
          "criticality": {
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "mappedRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestedAnswer": {
            "type": "string"
          },
          "evidenceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "answerText": {
            "type": "string"
          },
          "answerReservation": {
            "type": "string"
          },
          "answerConfidence": {
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "answerExportStatus": {
            "enum": [
              "draft",
              "ready",
              "reserved",
              "do-not-export"
            ]
          }
        }
      },
      "evidence": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "caseId",
          "questionId",
          "templateId",
          "title",
          "category",
          "description",
          "sensitivity",
          "status",
          "strength",
          "recommendedFormat",
          "linkedRequirements"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "caseId": {
            "type": "string",
            "minLength": 1
          },
          "questionId": {
            "type": "string",
            "minLength": 1
          },
          "templateId": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "$ref": "#/$defs/proofCategory"
          },
          "description": {
            "type": "string"
          },
          "sensitivity": {
            "enum": [
              "public",
              "internal",
              "confidential",
              "secret"
            ]
          },
          "status": {
            "enum": [
              "expected",
              "available",
              "missing",
              "expired",
              "declared",
              "not-exportable"
            ]
          },
          "strength": {
            "enum": [
              "weak",
              "medium",
              "strong"
            ]
          },
          "recommendedFormat": {
            "type": "string"
          },
          "linkedRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "debt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "caseId",
          "questionId",
          "severity",
          "reason",
          "recommendedAction"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "caseId": {
            "type": "string",
            "minLength": 1
          },
          "questionId": {
            "type": "string",
            "minLength": 1
          },
          "evidenceId": {
            "type": "string"
          },
          "severity": {
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "recommendedAction": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "proofCategory": {
        "enum": [
          "access-control",
          "backup",
          "incident-response",
          "business-continuity",
          "supplier-security",
          "governance",
          "logging-monitoring",
          "vulnerability-management",
          "data-protection",
          "unknown"
        ]
      }
    }
  },
  "verificationUrl": "/api/verify.json"
}