{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openssom.org/schema/smart-pump-cyber-proof-bundle.json",
  "title": "Smart Pump Cyber-Aware Proof Bundle",
  "type": "object",
  "required": [
    "bundle_id",
    "proof_version",
    "canonical_asset_id",
    "equipment_roles",
    "device_roles",
    "lifecycle_roles",
    "control_context",
    "monitoring_context",
    "cyber_context",
    "work_and_outcome_context",
    "source_provenance",
    "supporting_artifacts"
  ],
  "properties": {
    "bundle_id": { "type": "string" },
    "proof_version": { "type": "string" },
    "canonical_asset_id": { "type": "string" },
    "equipment_roles": { "type": "array", "minItems": 1, "items": { "type": "string" } },
    "device_roles": { "type": "array", "minItems": 1, "items": { "type": "string" } },
    "lifecycle_roles": { "type": "array", "minItems": 2, "items": { "type": "string" } },
    "control_context": {
      "type": "object",
      "required": ["related_controller_asset_id", "relationship_type", "evidence_refs"],
      "properties": {
        "related_controller_asset_id": { "type": "string" },
        "relationship_type": { "type": "string" },
        "evidence_refs": { "type": "array", "minItems": 1, "items": { "type": "string" } }
      },
      "additionalProperties": false
    },
    "monitoring_context": {
      "type": "object",
      "required": ["measurement_type", "condition_summary", "temporal_integrity_summary", "evidence_refs"],
      "properties": {
        "measurement_type": { "type": "string" },
        "condition_summary": { "type": "string" },
        "temporal_integrity_summary": { "type": "string" },
        "evidence_refs": { "type": "array", "minItems": 1, "items": { "type": "string" } }
      },
      "additionalProperties": false
    },
    "cyber_context": {
      "type": "object",
      "required": [
        "firmware_identity",
        "software_identity",
        "network_identity",
        "vulnerability_refs",
        "security_posture_ref",
        "supported_relationships",
        "canonical_risk_conclusions"
      ],
      "properties": {
        "firmware_identity": { "type": ["string", "null"] },
        "software_identity": { "type": ["string", "null"] },
        "network_identity": { "type": ["string", "null"] },
        "vulnerability_refs": { "type": "array", "minItems": 1, "items": { "type": "string" } },
        "security_posture_ref": { "type": "string" },
        "supported_relationships": { "type": "array", "minItems": 1, "items": { "type": "string" } },
        "canonical_risk_conclusions": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["conclusion_id", "conclusion_state", "evidence_refs", "derived_from_source_facts", "approval_state", "effective_time"],
            "properties": {
              "conclusion_id": { "type": "string" },
              "conclusion_state": { "type": "string" },
              "evidence_refs": { "type": "array", "items": { "type": "string" } },
              "derived_from_source_facts": { "type": "array", "minItems": 1, "items": { "type": "string" } },
              "approval_state": { "type": "string" },
              "effective_time": { "type": "string", "format": "date-time" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "work_and_outcome_context": {
      "type": "object",
      "required": ["work_execution_ref", "verification_ref", "outcome_ref", "outcome_summary"],
      "properties": {
        "work_execution_ref": { "type": "string" },
        "verification_ref": { "type": "string" },
        "outcome_ref": { "type": "string" },
        "outcome_summary": { "type": "string" }
      },
      "additionalProperties": false
    },
    "source_provenance": {
      "type": "array",
      "minItems": 2,
      "items": {
        "type": "object",
        "required": ["source_platform", "fact_summary", "evidence_ref", "event_time"],
        "properties": {
          "source_platform": { "type": "string" },
          "fact_summary": { "type": "string" },
          "evidence_ref": { "type": "string" },
          "event_time": { "type": "string", "format": "date-time" }
        },
        "additionalProperties": false
      }
    },
    "supporting_artifacts": { "type": "array", "minItems": 2, "items": { "type": "string" } }
  },
  "additionalProperties": false
}