@@ -17,18 +17,20 @@ Threat Dragon will check a threat model against the schema when it is loading an
1717but it will not stop the threat model from loading.
1818
1919If there is doubt about a threat model then ajv (Another JSON Validator) can be run from the
20- command line to provide details of any discrepancy :
20+ command line to provide detail for most errors or omissions :
2121
2222``` text
2323sudo npm install -g ajv-cli
2424# if validating a version 1.x threat model
25- ajv validate -s ~/owasp. threat-dragon.schema.V1 .json --all-errors --verbose \
25+ ajv validate -s ~/threat-dragon-v1 .schema.json --all-errors --verbose \
2626 -d ThreatDragonModels/demo-threat-model.json
2727# or if validating a version 2.x threat model
28- ajv validate --allow-union-types -s ~/owasp. threat-dragon.schema.V2 .json --all-errors --verbose \
28+ ajv validate --allow-union-types -s ~/threat-dragon-v2 .schema.json --all-errors --verbose \
2929 -d ThreatDragonModels/v2-threat-model.json
3030```
3131
32+ The commands use a schema downloaded from either [ version 1] [ td-v1-schema ] or [ version 2] [ td-v2-schema ] schema files.
33+
3234### TM-BOM
3335
3436The schema for the Threat Modeling - Bill of Materials (TM-BOM) file format is being developed as part of the
@@ -83,7 +85,7 @@ Threat Dragon: _making threat modeling less threatening_
8385
8486[ json-schema ] : https://json-schema.org/
8587[ otm-schema ] : https://github.com/iriusrisk/OpenThreatModel/blob/main/otm_schema.json
86- [ td-v1-schema ] : https://github.com/OWASP/threat-dragon/blob/main/td.vue/src/assets/owasp. threat-dragon.schema.V1 .json
87- [ td-v2-schema ] : https://github.com/OWASP/threat-dragon/blob/main/td.vue/src/assets/owasp. threat-dragon.schema.V2 .json
88+ [ td-v1-schema ] : https://github.com/OWASP/threat-dragon/blob/main/td.vue/src/assets/schema/ threat-dragon-v1 .schema.json
89+ [ td-v2-schema ] : https://github.com/OWASP/threat-dragon/blob/main/td.vue/src/assets/schema/ threat-dragon-v2 .schema.json
8890[ tm-library ] : https://github.com/OWASP/www-project-threat-model-library
8991[ tm-library-schema ] : https://github.com/OWASP/www-project-threat-model-library/blob/main/threat-model.schema.json
0 commit comments