The original version 1.x schema for Threat Dragon models conforms to JSON Schema.
There were some changes, mainly in the diagram component properties for version 2 Threat Dragon threat models, and so there is a different schema for these threat models - also conforming to JSON Schema.
Threat Dragon will check a threat model against the schema when it is loading and warn if there is a problem, but it will not stop the threat model from loading.
If there is doubt about a threat model then ajv (Another JSON Validator) can be run from the command line to provide details of any discrepancy:
sudo npm install -g ajv-cli
# if validating a version 1.x threat model
ajv validate -s ~/owasp.threat-dragon.schema.V1.json --all-errors --verbose \
-d ThreatDragonModels/demo-threat-model.json
# or if validating a version 2.x threat model
ajv validate --allow-union-types -s ~/owasp.threat-dragon.schema.V2.json --all-errors --verbose \
-d ThreatDragonModels/v2-threat-model.json
The schema for the Threat Modeling - Bill of Materials (TM-BOM) file format is being developed as part of the OWASP Threat Model Library project. The long term plan for Threat Dragon is to adopt this as the primary file format for both read/import and write/export of threat model files.
The TM-BOM schema defines various object that make up a TM-BOM threat model :
Threat Dragon: making threat modeling less threatening