{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/grokify/threat-model-spec/docs/versions/v0.6.0/threat-model.schema.json",
  "$ref": "#/$defs/ThreatModel",
  "$defs": {
    "Actor": {
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ElementType"
        },
        "malicious": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "label"
      ]
    },
    "AlertThreshold": {
      "properties": {
        "metric": {
          "type": "string"
        },
        "threshold": {
          "type": "string"
        },
        "window": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "metric",
        "threshold"
      ]
    },
    "Asset": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/AssetType"
        },
        "classification": {
          "$ref": "#/$defs/SensitivityLevel"
        },
        "owner": {
          "type": "string"
        },
        "elementIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "dataTypes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "complianceFrameworks": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "value": {
          "type": "string"
        },
        "retentionPeriod": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "name",
        "classification"
      ]
    },
    "AssetClassification": {
      "type": "string",
      "enum": [
        "crown-jewel",
        "high",
        "medium",
        "low"
      ]
    },
    "AssetType": {
      "type": "string",
      "enum": [
        "data",
        "service",
        "infrastructure",
        "credential",
        "identity",
        "intellectual-property"
      ]
    },
    "Assumption": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/AssumptionType"
        },
        "rationale": {
          "type": "string"
        },
        "impact": {
          "type": "string"
        },
        "impactSeverity": {
          "type": "string"
        },
        "validationStatus": {
          "$ref": "#/$defs/ValidationStatus"
        },
        "validationMethod": {
          "type": "string"
        },
        "validatedDate": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "relatedComponentIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title"
      ]
    },
    "AssumptionType": {
      "type": "string",
      "enum": [
        "trust",
        "security",
        "operational",
        "environment",
        "threat",
        "compliance",
        "dependency"
      ]
    },
    "AtomicTestMapping": {
      "properties": {
        "techniqueId": {
          "type": "string"
        },
        "atomicTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "validated": {
          "type": "boolean"
        },
        "lastRun": {
          "type": "string"
        },
        "result": {
          "$ref": "#/$defs/AtomicTestResult"
        },
        "notes": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "executionTime": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "techniqueId"
      ]
    },
    "AtomicTestResult": {
      "type": "string",
      "enum": [
        "passed",
        "failed",
        "blocked",
        "skipped",
        "error"
      ]
    },
    "Attack": {
      "properties": {
        "step": {
          "type": "integer"
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "outcome": {
          "type": "string"
        },
        "mitreTactic": {
          "$ref": "#/$defs/MITRETactic"
        },
        "mitreTechnique": {
          "type": "string"
        },
        "atlasTechnique": {
          "type": "string"
        },
        "owaspIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "asiIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "strideThreats": {
          "items": {
            "$ref": "#/$defs/STRIDEThreat"
          },
          "type": "array"
        },
        "linddunThreats": {
          "items": {
            "$ref": "#/$defs/LINDDUNThreat"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "redTeamNotes": {
          "type": "string"
        },
        "blueTeamNotes": {
          "type": "string"
        },
        "remediationNote": {
          "type": "string"
        },
        "testRef": {
          "$ref": "#/$defs/TestReference"
        },
        "componentRefs": {
          "items": {
            "$ref": "#/$defs/ComponentReference"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "step",
        "from",
        "to",
        "label"
      ]
    },
    "AttackTree": {
      "properties": {
        "rootId": {
          "type": "string"
        },
        "nodes": {
          "items": {
            "$ref": "#/$defs/AttackTreeNode"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "rootId",
        "nodes"
      ]
    },
    "AttackTreeNode": {
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "nodeType": {
          "$ref": "#/$defs/AttackTreeNodeType"
        },
        "description": {
          "type": "string"
        },
        "children": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mitreTechnique": {
          "type": "string"
        },
        "strideThreats": {
          "items": {
            "$ref": "#/$defs/STRIDEThreat"
          },
          "type": "array"
        },
        "probability": {
          "type": "number"
        },
        "cost": {
          "type": "string"
        },
        "difficulty": {
          "type": "string"
        },
        "countermeasure": {
          "type": "string"
        },
        "mitigated": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "label",
        "nodeType"
      ]
    },
    "AttackTreeNodeType": {
      "type": "string",
      "enum": [
        "AND",
        "OR",
        "LEAF"
      ]
    },
    "Author": {
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ]
    },
    "Boundary": {
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/BoundaryType"
        },
        "parentId": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "label",
        "type"
      ]
    },
    "BoundaryType": {
      "type": "string",
      "enum": [
        "browser",
        "localhost",
        "network",
        "cloud",
        "breached"
      ]
    },
    "BusinessImpact": {
      "properties": {
        "revenueImpact": {
          "$ref": "#/$defs/LossEstimate"
        },
        "customerImpact": {
          "type": "string"
        },
        "regulatoryImpact": {
          "type": "string"
        },
        "reputationImpact": {
          "type": "string"
        },
        "operationalImpact": {
          "type": "string"
        },
        "legalImpact": {
          "type": "string"
        },
        "criticality": {
          "type": "string"
        },
        "recoveryTimeEstimate": {
          "$ref": "#/$defs/Duration"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CISControlMapping": {
      "properties": {
        "controlId": {
          "type": "string"
        },
        "controlName": {
          "type": "string"
        },
        "safeguardId": {
          "type": "string"
        },
        "safeguardName": {
          "type": "string"
        },
        "implementationGroup": {
          "type": "string"
        },
        "assetType": {
          "type": "string"
        },
        "securityFunction": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "controlId"
      ]
    },
    "CVEMapping": {
      "properties": {
        "id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "affectedComponents": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "affectedVersions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "cvss": {
          "$ref": "#/$defs/CVSSMapping"
        },
        "url": {
          "type": "string"
        },
        "references": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ]
    },
    "CVSSMapping": {
      "properties": {
        "version": {
          "type": "string"
        },
        "vector": {
          "type": "string"
        },
        "baseScore": {
          "type": "number"
        },
        "severity": {
          "$ref": "#/$defs/CVSSSeverity"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "version",
        "vector",
        "baseScore",
        "severity"
      ]
    },
    "CVSSSeverity": {
      "type": "string",
      "enum": [
        "None",
        "Low",
        "Medium",
        "High",
        "Critical"
      ]
    },
    "CWEMapping": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id"
      ]
    },
    "ChecklistItem": {
      "properties": {
        "item": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "notes": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "item"
      ]
    },
    "CloudInfo": {
      "properties": {
        "provider": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "vpc": {
          "type": "string"
        },
        "subnet": {
          "type": "string"
        },
        "resourceId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CodePattern": {
      "properties": {
        "language": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "explanation": {
          "type": "string"
        },
        "cwe": {
          "type": "string"
        },
        "framework": {
          "type": "string"
        },
        "filePath": {
          "type": "string"
        },
        "lineRange": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "language",
        "description",
        "code"
      ]
    },
    "ComplianceFramework": {
      "type": "string",
      "enum": [
        "soc2",
        "pci-dss",
        "hipaa",
        "gdpr",
        "ccpa",
        "fedramp",
        "nist-sp-800-53",
        "nist-sp-800-171",
        "sox",
        "glba"
      ]
    },
    "ComplianceMapping": {
      "properties": {
        "framework": {
          "$ref": "#/$defs/ComplianceFramework"
        },
        "requirementId": {
          "type": "string"
        },
        "requirementName": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "evidence": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "framework",
        "requirementId"
      ]
    },
    "ComponentReference": {
      "properties": {
        "id": {
          "type": "string"
        },
        "purl": {
          "type": "string"
        },
        "cpe": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "supplier": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "vulnerabilityIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ConfigChange": {
      "properties": {
        "setting": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "file": {
          "type": "string"
        },
        "currentValue": {
          "type": "string"
        },
        "impact": {
          "type": "string"
        },
        "restartRequired": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "setting",
        "value"
      ]
    },
    "Contact": {
      "properties": {
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "slack": {
          "type": "string"
        },
        "pagerDuty": {
          "type": "string"
        },
        "availability": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ]
    },
    "Controls": {
      "properties": {
        "nistCsf": {
          "items": {
            "$ref": "#/$defs/NISTCSFMapping"
          },
          "type": "array"
        },
        "cis": {
          "items": {
            "$ref": "#/$defs/CISControlMapping"
          },
          "type": "array"
        },
        "iso27001": {
          "items": {
            "$ref": "#/$defs/ISO27001Mapping"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CoverageLevel": {
      "type": "string",
      "enum": [
        "none",
        "minimal",
        "partial",
        "substantial",
        "full"
      ]
    },
    "CoverageSummary": {
      "properties": {
        "totalTechniques": {
          "type": "integer"
        },
        "coveredFull": {
          "type": "integer"
        },
        "coveredSubstantial": {
          "type": "integer"
        },
        "coveredPartial": {
          "type": "integer"
        },
        "coveredMinimal": {
          "type": "integer"
        },
        "notCovered": {
          "type": "integer"
        },
        "coveragePercent": {
          "type": "number"
        },
        "effectiveCoveragePercent": {
          "type": "number"
        },
        "gapsByTactic": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "totalTechniques",
        "coveredFull",
        "coveredSubstantial",
        "coveredPartial",
        "coveredMinimal",
        "notCovered",
        "coveragePercent",
        "effectiveCoveragePercent"
      ]
    },
    "Currency": {
      "properties": {
        "amount": {
          "type": "number"
        },
        "code": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "amount"
      ]
    },
    "DataSourceType": {
      "type": "string",
      "enum": [
        "logs",
        "siem",
        "edr",
        "ndr",
        "ids",
        "waf",
        "cloudtrail",
        "api-gateway",
        "network-capture",
        "user-behavior",
        "audit-log"
      ]
    },
    "DefenseGuidance": {
      "properties": {
        "detectionRules": {
          "items": {
            "$ref": "#/$defs/DetectionRule"
          },
          "type": "array"
        },
        "iocs": {
          "items": {
            "$ref": "#/$defs/IOC"
          },
          "type": "array"
        },
        "logSources": {
          "items": {
            "$ref": "#/$defs/LogSource"
          },
          "type": "array"
        },
        "huntingQueries": {
          "items": {
            "$ref": "#/$defs/HuntingQuery"
          },
          "type": "array"
        },
        "monitoringRecommendations": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "alertThresholds": {
          "items": {
            "$ref": "#/$defs/AlertThreshold"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "DependencyRisk": {
      "properties": {
        "componentRef": {
          "$ref": "#/$defs/ComponentReference"
        },
        "riskLevel": {
          "$ref": "#/$defs/RiskLevel"
        },
        "vulnerabilityCount": {
          "type": "integer"
        },
        "criticalCount": {
          "type": "integer"
        },
        "highCount": {
          "type": "integer"
        },
        "outdatedBy": {
          "type": "integer"
        },
        "lastUpdated": {
          "type": "string"
        },
        "deprecated": {
          "type": "boolean"
        },
        "unmaintained": {
          "type": "boolean"
        },
        "directDependency": {
          "type": "boolean"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Detection": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "threatIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "attackSteps": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "mitreTechniques": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "method": {
          "type": "string"
        },
        "dataSources": {
          "items": {
            "$ref": "#/$defs/DataSourceType"
          },
          "type": "array"
        },
        "coverage": {
          "$ref": "#/$defs/DetectionCoverage"
        },
        "latencySeconds": {
          "type": "integer"
        },
        "falsePositiveRate": {
          "type": "string"
        },
        "detectionLogic": {
          "type": "string"
        },
        "tool": {
          "type": "string"
        },
        "playbookId": {
          "type": "string"
        },
        "alertSeverity": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title",
        "coverage"
      ]
    },
    "DetectionCoverage": {
      "type": "string",
      "enum": [
        "none",
        "partial",
        "full"
      ]
    },
    "DetectionCoverageMatrix": {
      "properties": {
        "techniques": {
          "items": {
            "$ref": "#/$defs/TechniqueCoverage"
          },
          "type": "array"
        },
        "summary": {
          "$ref": "#/$defs/CoverageSummary"
        },
        "lastUpdated": {
          "type": "string"
        },
        "source": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "techniques"
      ]
    },
    "DetectionFormat": {
      "type": "string",
      "enum": [
        "sigma",
        "yara",
        "splunk",
        "elastic",
        "kql",
        "snort",
        "suricata",
        "custom"
      ]
    },
    "DetectionRule": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "format": {
          "$ref": "#/$defs/DetectionFormat"
        },
        "rule": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "falsePositives": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "references": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mitreTechniques": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "status": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "testRefs": {
          "items": {
            "$ref": "#/$defs/TestReference"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "name",
        "format",
        "rule"
      ]
    },
    "DiagramType": {
      "type": "string",
      "enum": [
        "dfd",
        "attack-chain",
        "sequence",
        "attack-tree"
      ]
    },
    "DiagramView": {
      "properties": {
        "type": {
          "$ref": "#/$defs/DiagramType"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "direction": {
          "$ref": "#/$defs/Direction"
        },
        "legend": {
          "$ref": "#/$defs/Legend"
        },
        "mappings": {
          "$ref": "#/$defs/Mappings"
        },
        "elements": {
          "items": {
            "$ref": "#/$defs/Element"
          },
          "type": "array"
        },
        "boundaries": {
          "items": {
            "$ref": "#/$defs/Boundary"
          },
          "type": "array"
        },
        "flows": {
          "items": {
            "$ref": "#/$defs/Flow"
          },
          "type": "array"
        },
        "attacks": {
          "items": {
            "$ref": "#/$defs/Attack"
          },
          "type": "array"
        },
        "targets": {
          "items": {
            "$ref": "#/$defs/Target"
          },
          "type": "array"
        },
        "actors": {
          "items": {
            "$ref": "#/$defs/Actor"
          },
          "type": "array"
        },
        "phases": {
          "items": {
            "$ref": "#/$defs/Phase"
          },
          "type": "array"
        },
        "messages": {
          "items": {
            "$ref": "#/$defs/Message"
          },
          "type": "array"
        },
        "attackTree": {
          "$ref": "#/$defs/AttackTree"
        },
        "threats": {
          "items": {
            "$ref": "#/$defs/ThreatEntry"
          },
          "type": "array"
        },
        "mitigations": {
          "items": {
            "$ref": "#/$defs/Mitigation"
          },
          "type": "array"
        },
        "detections": {
          "items": {
            "$ref": "#/$defs/Detection"
          },
          "type": "array"
        },
        "responseActions": {
          "items": {
            "$ref": "#/$defs/ResponseAction"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type"
      ]
    },
    "Direction": {
      "type": "string",
      "enum": [
        "right",
        "down",
        "left",
        "up"
      ]
    },
    "Duration": {
      "properties": {
        "value": {
          "type": "integer"
        },
        "unit": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "value",
        "unit"
      ]
    },
    "EPSSData": {
      "properties": {
        "cve": {
          "type": "string"
        },
        "epssScore": {
          "type": "number"
        },
        "percentile": {
          "type": "number"
        },
        "dateScored": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "cve",
        "epssScore",
        "percentile"
      ]
    },
    "Element": {
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ElementType"
        },
        "parentId": {
          "type": "string"
        },
        "classification": {
          "$ref": "#/$defs/AssetClassification"
        },
        "strideThreats": {
          "items": {
            "$ref": "#/$defs/STRIDEThreat"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "network": {
          "$ref": "#/$defs/NetworkInfo"
        },
        "assetIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "label",
        "type"
      ]
    },
    "ElementType": {
      "type": "string",
      "enum": [
        "process",
        "datastore",
        "external-entity",
        "gateway",
        "browser",
        "agent",
        "api"
      ]
    },
    "ExploitDifficulty": {
      "type": "string",
      "enum": [
        "trivial",
        "low",
        "medium",
        "high",
        "expert"
      ]
    },
    "ExploitationGuidance": {
      "properties": {
        "prerequisites": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "exploitationSteps": {
          "items": {
            "$ref": "#/$defs/ExploitationStep"
          },
          "type": "array"
        },
        "tools": {
          "items": {
            "$ref": "#/$defs/OffensiveTool"
          },
          "type": "array"
        },
        "payloadPatterns": {
          "items": {
            "$ref": "#/$defs/PayloadPattern"
          },
          "type": "array"
        },
        "successIndicators": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "difficulty": {
          "$ref": "#/$defs/ExploitDifficulty"
        },
        "testRefs": {
          "items": {
            "$ref": "#/$defs/TestReference"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        },
        "timeToExploit": {
          "type": "string"
        },
        "skillLevel": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ExploitationStep": {
      "properties": {
        "step": {
          "type": "integer"
        },
        "action": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "tool": {
          "type": "string"
        },
        "example": {
          "type": "string"
        },
        "expectedResult": {
          "type": "string"
        },
        "mitreTechnique": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "step",
        "action"
      ]
    },
    "FAIRAssessment": {
      "properties": {
        "threatEventFrequency": {
          "$ref": "#/$defs/FrequencyEstimate"
        },
        "vulnerability": {
          "$ref": "#/$defs/Percentage"
        },
        "primaryLoss": {
          "$ref": "#/$defs/LossEstimate"
        },
        "secondaryLoss": {
          "$ref": "#/$defs/LossEstimate"
        },
        "annualizedLossExpectancy": {
          "$ref": "#/$defs/Currency"
        },
        "riskScore": {
          "type": "number"
        },
        "assessmentDate": {
          "type": "string"
        },
        "assessor": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Flow": {
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/FlowType"
        },
        "bidirectional": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "from",
        "to"
      ]
    },
    "FlowType": {
      "type": "string",
      "enum": [
        "normal",
        "attack",
        "exfil"
      ]
    },
    "FrequencyEstimate": {
      "properties": {
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "mostLikely": {
          "type": "number"
        },
        "confidence": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "min",
        "max",
        "mostLikely"
      ]
    },
    "HuntingQuery": {
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "platform": {
          "$ref": "#/$defs/DetectionFormat"
        },
        "query": {
          "type": "string"
        },
        "hypothesis": {
          "type": "string"
        },
        "dataSources": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mitreTechniques": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "expectedResults": {
          "type": "string"
        },
        "author": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "platform",
        "query"
      ]
    },
    "IOC": {
      "properties": {
        "type": {
          "$ref": "#/$defs/IOCType"
        },
        "value": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "confidence": {
          "type": "string"
        },
        "validUntil": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "malwareFamily": {
          "type": "string"
        },
        "threatActor": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type",
        "value"
      ]
    },
    "IOCType": {
      "type": "string",
      "enum": [
        "ip",
        "domain",
        "url",
        "hash",
        "filepath",
        "email",
        "registry",
        "process",
        "certificate",
        "pattern"
      ]
    },
    "ISO27001Mapping": {
      "properties": {
        "controlId": {
          "type": "string"
        },
        "controlName": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "objective": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "controlId"
      ]
    },
    "IncidentPlaybook": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "threatType": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "steps": {
          "items": {
            "$ref": "#/$defs/PlaybookStep"
          },
          "type": "array"
        },
        "contacts": {
          "items": {
            "$ref": "#/$defs/Contact"
          },
          "type": "array"
        },
        "tools": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "references": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mitreTechniques": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "slaMinutes": {
          "type": "integer"
        },
        "lastReviewed": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "name"
      ]
    },
    "LINDDUNMapping": {
      "properties": {
        "category": {
          "$ref": "#/$defs/LINDDUNThreat"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "affectedDataTypes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "affectedComponents": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "dataSubjects": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "privacyPrinciple": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "category"
      ]
    },
    "LINDDUNThreat": {
      "type": "string",
      "enum": [
        "L",
        "I",
        "N",
        "D",
        "Di",
        "U",
        "Nc"
      ]
    },
    "Legend": {
      "properties": {
        "show": {
          "type": "boolean"
        },
        "showStride": {
          "type": "boolean"
        },
        "showLinddun": {
          "type": "boolean"
        },
        "showMitre": {
          "type": "boolean"
        },
        "showAssets": {
          "type": "boolean"
        },
        "showElements": {
          "type": "boolean"
        },
        "showBoundaries": {
          "type": "boolean"
        },
        "showMitigations": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "show"
      ]
    },
    "Library": {
      "properties": {
        "name": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "examples": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "version": {
          "type": "string"
        },
        "installCommand": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "alternatives": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "language",
        "purpose"
      ]
    },
    "LogSource": {
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "eventIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "fields": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "category": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "retentionDays": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ]
    },
    "LossEstimate": {
      "properties": {
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "mostLikely": {
          "type": "number"
        },
        "currency": {
          "$ref": "#/$defs/Currency"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "min",
        "max",
        "mostLikely"
      ]
    },
    "MITREATLASMapping": {
      "properties": {
        "tacticId": {
          "type": "string"
        },
        "tacticName": {
          "type": "string"
        },
        "techniqueId": {
          "type": "string"
        },
        "techniqueName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "tacticId",
        "techniqueId"
      ]
    },
    "MITREAttackMapping": {
      "properties": {
        "tacticId": {
          "type": "string"
        },
        "tacticName": {
          "type": "string"
        },
        "techniqueId": {
          "type": "string"
        },
        "techniqueName": {
          "type": "string"
        },
        "subTechniqueId": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "tacticId",
        "techniqueId"
      ]
    },
    "MITRETactic": {
      "type": "string",
      "enum": [
        "TA0001",
        "TA0002",
        "TA0003",
        "TA0004",
        "TA0005",
        "TA0006",
        "TA0007",
        "TA0008",
        "TA0009",
        "TA0010",
        "TA0011",
        "TA0040"
      ]
    },
    "Mappings": {
      "properties": {
        "mitreAttack": {
          "items": {
            "$ref": "#/$defs/MITREAttackMapping"
          },
          "type": "array"
        },
        "mitreAtlas": {
          "items": {
            "$ref": "#/$defs/MITREATLASMapping"
          },
          "type": "array"
        },
        "owasp": {
          "items": {
            "$ref": "#/$defs/OWASPMapping"
          },
          "type": "array"
        },
        "cwe": {
          "items": {
            "$ref": "#/$defs/CWEMapping"
          },
          "type": "array"
        },
        "cve": {
          "items": {
            "$ref": "#/$defs/CVEMapping"
          },
          "type": "array"
        },
        "cvss": {
          "$ref": "#/$defs/CVSSMapping"
        },
        "stride": {
          "items": {
            "$ref": "#/$defs/STRIDEMapping"
          },
          "type": "array"
        },
        "linddun": {
          "items": {
            "$ref": "#/$defs/LINDDUNMapping"
          },
          "type": "array"
        },
        "controls": {
          "$ref": "#/$defs/Controls"
        },
        "compliance": {
          "items": {
            "$ref": "#/$defs/ComplianceMapping"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "Message": {
      "properties": {
        "seq": {
          "type": "integer"
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/FlowType"
        },
        "mitreTechnique": {
          "type": "string"
        },
        "note": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "seq",
        "from",
        "to",
        "label"
      ]
    },
    "MetricDuration": {
      "properties": {
        "value": {
          "type": "number"
        },
        "unit": {
          "$ref": "#/$defs/MetricTimeUnit"
        },
        "source": {
          "type": "string"
        },
        "confidence": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "value",
        "unit"
      ]
    },
    "MetricTimeUnit": {
      "type": "string",
      "enum": [
        "seconds",
        "minutes",
        "hours",
        "days",
        "weeks"
      ]
    },
    "Mitigation": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "threatIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "strideCategories": {
          "items": {
            "$ref": "#/$defs/STRIDEThreat"
          },
          "type": "array"
        },
        "controlId": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/MitigationStatus"
        },
        "owner": {
          "type": "string"
        },
        "verifiedDate": {
          "type": "string"
        },
        "effectiveness": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title",
        "status"
      ]
    },
    "MitigationStatus": {
      "type": "string",
      "enum": [
        "planned",
        "implemented",
        "partial",
        "accepted",
        "transferred",
        "not-applicable"
      ]
    },
    "ModelPhase": {
      "type": "string",
      "enum": [
        "design",
        "development",
        "review",
        "production",
        "incident"
      ]
    },
    "Motivation": {
      "type": "string",
      "enum": [
        "financial",
        "espionage",
        "disruption",
        "destruction",
        "ideological",
        "revenge",
        "notoriety",
        "curiosity",
        "competitive"
      ]
    },
    "NISTCSFFunction": {
      "type": "string",
      "enum": [
        "Identify",
        "Protect",
        "Detect",
        "Respond",
        "Recover"
      ]
    },
    "NISTCSFMapping": {
      "properties": {
        "function": {
          "$ref": "#/$defs/NISTCSFFunction"
        },
        "category": {
          "type": "string"
        },
        "categoryName": {
          "type": "string"
        },
        "subcategory": {
          "type": "string"
        },
        "subcategoryName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "function",
        "category"
      ]
    },
    "NetworkInfo": {
      "properties": {
        "host": {
          "type": "string"
        },
        "ports": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "protocols": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "zone": {
          "type": "string"
        },
        "cidr": {
          "type": "string"
        },
        "cloud": {
          "$ref": "#/$defs/CloudInfo"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "OWASPCategory": {
      "type": "string",
      "enum": [
        "api",
        "llm",
        "web",
        "agentic"
      ]
    },
    "OWASPMapping": {
      "properties": {
        "category": {
          "$ref": "#/$defs/OWASPCategory"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "category",
        "id"
      ]
    },
    "OffensiveTool": {
      "properties": {
        "name": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "template": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "license": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ]
    },
    "PayloadPattern": {
      "properties": {
        "type": {
          "type": "string"
        },
        "pattern": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "variants": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "encoding": {
          "type": "string"
        },
        "bypassTarget": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type",
        "pattern"
      ]
    },
    "Percentage": {
      "properties": {
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "mostLikely": {
          "type": "number"
        },
        "confidence": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "min",
        "max",
        "mostLikely"
      ]
    },
    "Phase": {
      "properties": {
        "name": {
          "type": "string"
        },
        "mitreTactic": {
          "$ref": "#/$defs/MITRETactic"
        },
        "description": {
          "type": "string"
        },
        "startMessage": {
          "type": "integer"
        },
        "endMessage": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "startMessage",
        "endMessage"
      ]
    },
    "PlaybookPhase": {
      "type": "string",
      "enum": [
        "preparation",
        "identification",
        "containment",
        "eradication",
        "recovery",
        "lessons-learned"
      ]
    },
    "PlaybookStep": {
      "properties": {
        "step": {
          "type": "integer"
        },
        "phase": {
          "$ref": "#/$defs/PlaybookPhase"
        },
        "action": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "automated": {
          "type": "boolean"
        },
        "automationScript": {
          "type": "string"
        },
        "timeMinutes": {
          "type": "integer"
        },
        "dependencies": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "escalationTrigger": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "commands": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "checklist": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "step",
        "action"
      ]
    },
    "Prerequisite": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/AssumptionType"
        },
        "required": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "dependsOn": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "relatedThreatIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title"
      ]
    },
    "Reference": {
      "properties": {
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "title",
        "url"
      ]
    },
    "RemediationGuidance": {
      "properties": {
        "vulnerablePatterns": {
          "items": {
            "$ref": "#/$defs/CodePattern"
          },
          "type": "array"
        },
        "securePatterns": {
          "items": {
            "$ref": "#/$defs/CodePattern"
          },
          "type": "array"
        },
        "reviewChecklist": {
          "items": {
            "$ref": "#/$defs/ChecklistItem"
          },
          "type": "array"
        },
        "recommendedLibraries": {
          "items": {
            "$ref": "#/$defs/Library"
          },
          "type": "array"
        },
        "configurationChanges": {
          "items": {
            "$ref": "#/$defs/ConfigChange"
          },
          "type": "array"
        },
        "testingApproach": {
          "$ref": "#/$defs/TestingApproach"
        },
        "timeToFix": {
          "type": "string"
        },
        "complexity": {
          "type": "string"
        },
        "breakingChanges": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ResourceLevel": {
      "type": "string",
      "enum": [
        "minimal",
        "limited",
        "moderate",
        "extensive",
        "unlimited"
      ]
    },
    "ResponseAction": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "triggerDetectionIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "actionType": {
          "type": "string"
        },
        "automated": {
          "type": "boolean"
        },
        "playbookUrl": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "escalationPath": {
          "type": "string"
        },
        "slaMinutes": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title"
      ]
    },
    "RiskAssessment": {
      "properties": {
        "likelihood": {
          "type": "integer"
        },
        "impact": {
          "type": "integer"
        },
        "score": {
          "type": "integer"
        },
        "level": {
          "$ref": "#/$defs/RiskLevel"
        },
        "likelihoodRationale": {
          "type": "string"
        },
        "impactRationale": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "likelihood",
        "impact"
      ]
    },
    "RiskLevel": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low",
        "info"
      ]
    },
    "SBOMReference": {
      "properties": {
        "format": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "serialNumber": {
          "type": "string"
        },
        "documentNamespace": {
          "type": "string"
        },
        "components": {
          "items": {
            "$ref": "#/$defs/ComponentReference"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SSVCAssessment": {
      "properties": {
        "vulnerabilityId": {
          "type": "string"
        },
        "exploitation": {
          "type": "string"
        },
        "automatable": {
          "type": "string"
        },
        "technicalImpact": {
          "type": "string"
        },
        "missionPrevalence": {
          "type": "string"
        },
        "publicWellBeing": {
          "type": "string"
        },
        "decision": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "assessedAt": {
          "type": "string"
        },
        "assessedBy": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "STRIDEMapping": {
      "properties": {
        "category": {
          "$ref": "#/$defs/STRIDEThreat"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "affectedComponents": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "category"
      ]
    },
    "STRIDEThreat": {
      "type": "string",
      "enum": [
        "S",
        "T",
        "R",
        "I",
        "D",
        "E"
      ]
    },
    "Scenario": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ScenarioType"
        },
        "threatActorId": {
          "type": "string"
        },
        "preconditions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "attackPath": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targetAssetIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targetElementIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "threatIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "risk": {
          "$ref": "#/$defs/RiskAssessment"
        },
        "outcome": {
          "type": "string"
        },
        "businessImpact": {
          "type": "string"
        },
        "mitigationIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "detectionIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title"
      ]
    },
    "ScenarioType": {
      "type": "string",
      "enum": [
        "external-attack",
        "insider-threat",
        "supply-chain",
        "data-breach",
        "privacy-violation",
        "denial-of-service",
        "escalation"
      ]
    },
    "SecurityMetrics": {
      "properties": {
        "mttd": {
          "$ref": "#/$defs/MetricDuration"
        },
        "mttr": {
          "$ref": "#/$defs/MetricDuration"
        },
        "mttc": {
          "$ref": "#/$defs/MetricDuration"
        },
        "mttre": {
          "$ref": "#/$defs/MetricDuration"
        },
        "detectionRate": {
          "type": "number"
        },
        "falsePositiveRate": {
          "type": "number"
        },
        "truePositiveRate": {
          "type": "number"
        },
        "escalationRate": {
          "type": "number"
        },
        "incidentCount": {
          "type": "integer"
        },
        "alertVolume": {
          "type": "integer"
        },
        "measuredAt": {
          "type": "string"
        },
        "measurementPeriod": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "SensitivityLevel": {
      "type": "string",
      "enum": [
        "public",
        "internal",
        "confidential",
        "restricted",
        "secret"
      ]
    },
    "Sophistication": {
      "type": "string",
      "enum": [
        "none",
        "low",
        "medium",
        "high",
        "advanced"
      ]
    },
    "Target": {
      "properties": {
        "elementId": {
          "type": "string"
        },
        "classification": {
          "$ref": "#/$defs/AssetClassification"
        },
        "strideThreats": {
          "items": {
            "$ref": "#/$defs/STRIDEThreat"
          },
          "type": "array"
        },
        "impact": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "elementId",
        "classification"
      ]
    },
    "TechniqueCoverage": {
      "properties": {
        "techniqueId": {
          "type": "string"
        },
        "techniqueName": {
          "type": "string"
        },
        "tactic": {
          "type": "string"
        },
        "coverage": {
          "$ref": "#/$defs/CoverageLevel"
        },
        "detectionIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "dataSources": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "notes": {
          "type": "string"
        },
        "confidence": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "techniqueId",
        "coverage"
      ]
    },
    "TestPurpose": {
      "type": "string",
      "enum": [
        "exploitation",
        "detection",
        "remediation",
        "regression"
      ]
    },
    "TestReference": {
      "properties": {
        "testId": {
          "type": "string"
        },
        "testFile": {
          "type": "string"
        },
        "purpose": {
          "$ref": "#/$defs/TestPurpose"
        },
        "description": {
          "type": "string"
        },
        "suiteId": {
          "type": "string"
        },
        "attackStep": {
          "type": "integer"
        },
        "automated": {
          "type": "boolean"
        },
        "tool": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "testId",
        "purpose"
      ]
    },
    "TestSuiteReference": {
      "properties": {
        "suiteId": {
          "type": "string"
        },
        "suiteFile": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "tests": {
          "items": {
            "$ref": "#/$defs/TestReference"
          },
          "type": "array"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ciEnabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "suiteId"
      ]
    },
    "TestingApproach": {
      "properties": {
        "unitTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "integrationTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "securityTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "regressionTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "manualTests": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "testRefs": {
          "items": {
            "$ref": "#/$defs/TestReference"
          },
          "type": "array"
        },
        "acceptanceCriteria": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "tools": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ThreatActor": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ThreatActorType"
        },
        "aliases": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "description": {
          "type": "string"
        },
        "sophistication": {
          "$ref": "#/$defs/Sophistication"
        },
        "motivations": {
          "items": {
            "$ref": "#/$defs/Motivation"
          },
          "type": "array"
        },
        "resources": {
          "$ref": "#/$defs/ResourceLevel"
        },
        "primaryGoals": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ttps": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targetedIndustries": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targetedRegions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "knownCampaigns": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "references": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "name",
        "type"
      ]
    },
    "ThreatActorType": {
      "type": "string",
      "enum": [
        "nation-state",
        "criminal",
        "hacktivist",
        "insider",
        "competitor",
        "terrorist",
        "script-kiddie",
        "researcher"
      ]
    },
    "ThreatEntry": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "strideCategory": {
          "$ref": "#/$defs/STRIDEThreat"
        },
        "linddunCategory": {
          "$ref": "#/$defs/LINDDUNThreat"
        },
        "affectedElements": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "affectedAssets": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/ThreatStatus"
        },
        "risk": {
          "$ref": "#/$defs/RiskAssessment"
        },
        "severity": {
          "type": "string"
        },
        "likelihood": {
          "type": "string"
        },
        "mitigationIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "attackVector": {
          "type": "string"
        },
        "preconditions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ssvcAssessment": {
          "$ref": "#/$defs/SSVCAssessment"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title",
        "status"
      ]
    },
    "ThreatModel": {
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "phase": {
          "$ref": "#/$defs/ModelPhase"
        },
        "authors": {
          "items": {
            "$ref": "#/$defs/Author"
          },
          "type": "array"
        },
        "references": {
          "items": {
            "$ref": "#/$defs/Reference"
          },
          "type": "array"
        },
        "mappings": {
          "$ref": "#/$defs/Mappings"
        },
        "diagrams": {
          "items": {
            "$ref": "#/$defs/DiagramView"
          },
          "type": "array"
        },
        "threatActors": {
          "items": {
            "$ref": "#/$defs/ThreatActor"
          },
          "type": "array"
        },
        "assumptions": {
          "items": {
            "$ref": "#/$defs/Assumption"
          },
          "type": "array"
        },
        "prerequisites": {
          "items": {
            "$ref": "#/$defs/Prerequisite"
          },
          "type": "array"
        },
        "mitigations": {
          "items": {
            "$ref": "#/$defs/Mitigation"
          },
          "type": "array"
        },
        "assets": {
          "items": {
            "$ref": "#/$defs/Asset"
          },
          "type": "array"
        },
        "scenarios": {
          "items": {
            "$ref": "#/$defs/Scenario"
          },
          "type": "array"
        },
        "redTeam": {
          "$ref": "#/$defs/ExploitationGuidance"
        },
        "blueTeam": {
          "$ref": "#/$defs/DefenseGuidance"
        },
        "remediation": {
          "$ref": "#/$defs/RemediationGuidance"
        },
        "playbooks": {
          "items": {
            "$ref": "#/$defs/IncidentPlaybook"
          },
          "type": "array"
        },
        "testSuites": {
          "items": {
            "$ref": "#/$defs/TestSuiteReference"
          },
          "type": "array"
        },
        "riskAssessment": {
          "$ref": "#/$defs/FAIRAssessment"
        },
        "businessImpact": {
          "$ref": "#/$defs/BusinessImpact"
        },
        "epssData": {
          "items": {
            "$ref": "#/$defs/EPSSData"
          },
          "type": "array"
        },
        "atomicTests": {
          "items": {
            "$ref": "#/$defs/AtomicTestMapping"
          },
          "type": "array"
        },
        "detectionCoverage": {
          "$ref": "#/$defs/DetectionCoverageMatrix"
        },
        "metrics": {
          "$ref": "#/$defs/SecurityMetrics"
        },
        "sbom": {
          "$ref": "#/$defs/SBOMReference"
        },
        "vexStatements": {
          "items": {
            "$ref": "#/$defs/VEXStatement"
          },
          "type": "array"
        },
        "dependencyRisks": {
          "items": {
            "$ref": "#/$defs/DependencyRisk"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title",
        "diagrams"
      ]
    },
    "ThreatStatus": {
      "type": "string",
      "enum": [
        "potential",
        "theoretical",
        "identified",
        "analyzing",
        "mitigated",
        "accepted",
        "transferred",
        "monitoring"
      ]
    },
    "VEXStatement": {
      "properties": {
        "id": {
          "type": "string"
        },
        "vulnerabilityId": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "justification": {
          "type": "string"
        },
        "impactStatement": {
          "type": "string"
        },
        "actionStatement": {
          "type": "string"
        },
        "products": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "subcomponents": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "supplier": {
          "type": "string"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time"
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ValidationStatus": {
      "type": "string",
      "enum": [
        "not-validated",
        "validated",
        "invalidated",
        "pending"
      ]
    }
  }
}