diff --git a/ThreatDragonModels/legacy_model/legacy_model.json b/ThreatDragonModels/demo-threat-model.json similarity index 100% rename from ThreatDragonModels/legacy_model/legacy_model.json rename to ThreatDragonModels/demo-threat-model.json diff --git a/ThreatDragonModels/demo-threat-model/demo-threat-model.json b/ThreatDragonModels/demo-threat-model/demo-threat-model.json deleted file mode 100644 index f36d3fd6f..000000000 --- a/ThreatDragonModels/demo-threat-model/demo-threat-model.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "summary": { - "title": "Demo Threat Model", - "owner": "Mike Goodwin", - "description": "A sample model of a web application, with a queue-decoupled background process.", - "id": 0 - }, - "detail": { - "contributors": [ - { - "name": "Tom Brown" - }, - { - "name": "Albert Moneypenny" - } - ], - "diagrams": [ - { - "title": "Main Request Data Flow", - "thumbnail": "./public/content/images/thumbnail.stride.jpg", - "diagramType": "STRIDE", - "id": 0, - "diagramJson": { - "cells": [ - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 565, - "y": 414 - }, - "angle": 0, - "id": "a25bbb4e-093f-4238-a620-31efdee452dc", - "z": 1, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "Encrypt the DB credentials in the configuration file.\n\nExpire and replace the DB credentials regularly.", - "description": "The Background Worker configuration stores the credentials used by the worker to access the DB. An attacker could compromise the Background Worker and get access to the DB credentials.", - "title": "Accessing DB credentials", - "type": "Information disclosure" - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Worker Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 290, - "y": 420 - }, - "angle": 0, - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1", - "z": 2, - "isALog": true, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "description": "An attacker could make an query call on the DB,", - "title": "Unauthorised access", - "type": "Information disclosure", - "mitigation": "Require all queries to be authenticated." - }, - { - "status": "Open", - "severity": "Medium", - "description": "An attacker could obtain the DB credentials ans use them to make unauthorised queries.", - "title": "Credential theft", - "type": "Information disclosure", - "mitigation": "Use a firewall to restrict access to the DB to only the Background Worker IP address." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Database" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 40, - "y": 420 - }, - "angle": 0, - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b", - "z": 3, - "threats": [ - { - "status": "Open", - "severity": "High", - "title": "Credentials should be encrypted", - "type": "Information disclosure", - "description": "The Web Application Config stores credentials used by the Web App to access the message queue. These could be stolen by an attacker and used to read confidential data or place poison message on the queue.", - "mitigation": "The Message Queue credentials should be encrypted." - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "outOfScope": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Web Application Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 502, - "y": 13 - }, - "angle": 0, - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067", - "z": 4, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Message secrecy", - "type": "Information disclosure", - "description": "The data flow between the Web Application and the Background Worker is not point-to-point and therefore end-to-end secrecy cannot be provided at the transport layer. Messages could be read by an attacker at rest in the Message Queue.", - "mitigation": "Use message level encryption for high sensitivity data (e.g. security tokens) in messages." - }, - { - "status": "Open", - "severity": "Medium", - "title": "Message tampering", - "type": "Tampering", - "description": "Messages on the queue could be tampered with, causing incorrect processing by the Background Worker.", - "mitigation": "Sign all queue messages at the Web Server. Validate the message signature at the Background Worker and reject any message with a missing or invalid signature. Log any failed messages." - }, - { - "status": "Mitigated", - "severity": "High", - "title": "Fake messages could be placed on the queue", - "type": "Spoofing", - "description": "An attacker could put a fake message on queue, causing the Background Worker to do incorrect processing.", - "mitigation": "Restrict access to the queue to the IP addresses of the Web Server and Background Worker.\n\nImplement authentication on the queue endpoint." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Message Queue" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 560, - "y": 180 - }, - "angle": 0, - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3", - "z": 5, - "threats": [ - { - "status": "Open", - "severity": "Medium", - "title": "Poison messages 1", - "type": "Denial of service", - "description": "An attacker could generate a malicious message that the Background Worker cannot process.", - "mitigation": "Implement a poison message queue where messages are placed after a fixed number of retries." - }, - { - "status": "Open", - "severity": "Medium", - "mitigation": "Validate the content of all messages, before processing. Reject any message that have invalid content and log the rejection. Do not log the malicious content - instead log a description of the error.", - "type": "Denial of service", - "title": "Poison messages 2", - "description": "An attacker could generate a malicious message that the Background Worker cannot process." - } - ], - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Background\nWorker Process" - }, - "#element-shape": { - "class": "" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 210, - "y": 180 - }, - "angle": 0, - "id": "0d9909ea-1398-4898-be81-cf1c808324dc", - "z": 6, - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Web\nApplication" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Actor", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 40, - "y": 29 - }, - "angle": 0, - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce", - "z": 7, - "threats": [], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Browser" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "x": 80, - "y": 220 - }, - "target": { - "x": 295, - "y": 51 - }, - "vertices": [ - { - "x": 276, - "y": 149 - } - ], - "id": "64d52ab0-9733-4ae9-af1b-a347cbc13186", - "z": 8, - "attrs": {} - }, - { - "type": "tm.Boundary", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "x": 350, - "y": 10 - }, - "target": { - "x": 663, - "y": 156 - }, - "vertices": [ - { - "x": 333, - "y": 117 - }, - { - "x": 432, - "y": 180 - } - ], - "id": "70a1b898-4131-462f-a26e-1adf9f2b2eda", - "z": 9, - "attrs": {} - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 245, - "y": 112 - } - ], - "id": "56b56e8c-751d-4d8a-a9c7-6554c9f142ee", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Request", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 10, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "isPublicNetwork": true, - "isEncrypted": true, - "protocol": "HTTP/S", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "vertices": [ - { - "x": 351, - "y": 120 - } - ], - "id": "86347588-6629-45e3-a441-09ca11bce894", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Put Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 13, - "threats": [ - { - "status": "Open", - "severity": "High", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 544, - "y": 127 - } - ], - "id": "4bbf279c-49c7-436d-9afa-e94435e6ec72", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 14, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", - "type": "Information disclosure", - "title": "Data flow should use HTTP/S", - "description": "These requests are made over the public internet and could be intercepted by an attacker." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 466, - "y": 347 - } - ], - "id": "75949d2c-0449-4a10-add3-07ac91a0c608", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Worker Query Results", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 17, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Man in the middle attack", - "type": "Information disclosure", - "mitigation": "Enforce an encrypted connection at the DB server", - "description": "An attacker could intercept the DB queries in transit and obtain sensitive information, such as DB credentials, query parameters or query results (is unlikely since the data flow is over a private network)." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "x": 241, - "y": 444 - }, - "target": { - "x": 526, - "y": 465 - }, - "vertices": [ - { - "x": 333, - "y": 288 - }, - { - "x": 488, - "y": 267 - }, - { - "x": 552, - "y": 339 - } - ], - "id": "a61cbe16-7e3f-400c-a0ea-c0695253c6ad", - "z": 18, - "attrs": {} - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "vertices": [ - { - "x": 111, - "y": 175 - } - ], - "id": "1b1cf1eb-d9ac-463b-a9ae-d816c42e7107", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Response", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 19, - "isEncrypted": true, - "isPublicNetwork": true, - "protocol": "HTTP/S", - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These responses are over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 157, - "y": 292 - } - ], - "id": "c8c746d8-2a26-464e-8524-3350be8dcae5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read web app config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 20, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "a25bbb4e-093f-4238-a620-31efdee452dc" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 664, - "y": 320 - } - ], - "id": "6cba52e8-0d26-481f-bcc1-dbf0b66d8b42", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read worker config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 21, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "vertices": [ - { - "x": 311, - "y": 324 - } - ], - "id": "2fd00bd2-c603-4d72-a12f-c20a3a1ba77b", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Queries", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 22, - "hasOpenThreats": false, - "isEncrypted": true, - "isPublicNetwork": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 377, - "y": 280 - } - ], - "id": "d117ddba-2508-45ce-b9ea-fb9df56a79e5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web App Query\nResults", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 23, - "hasOpenThreats": false, - "isEncrypted": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "size": { - "width": 10, - "height": 10 - }, - "smooth": true, - "source": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "target": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "vertices": [ - { - "x": 552, - "y": 382 - } - ], - "id": "015880b7-fb7a-4fe3-b729-fbd40bd7afcb", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Worker Queries", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 24, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - } - ] - }, - "size": { - "height": 594, - "width": 860 - } - } - ], - "reviewer": "Jane Smith" - } -} \ No newline at end of file diff --git a/ThreatDragonModels/legacy_desktop_model/legacy_desktop_model.json b/ThreatDragonModels/legacy_desktop_model/legacy_desktop_model.json deleted file mode 100644 index 162b806d0..000000000 --- a/ThreatDragonModels/legacy_desktop_model/legacy_desktop_model.json +++ /dev/null @@ -1,896 +0,0 @@ -{ - "summary": { - "title": "Demo Threat Model", - "owner": "Mike Goodwin", - "description": "A sample model of a web application, with a queue-decoupled background process.", - "id": 0 - }, - "detail": { - "contributors": [ - { - "name": "Tom Brown" - }, - { - "name": "Albert Moneypenny" - } - ], - "diagrams": [ - { - "title": "Main Request Data Flow", - "thumbnail": "./public/content/images/thumbnail.stride.jpg", - "diagramType": "STRIDE", - "id": 0, - "diagramJson": { - "cells": [ - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 637, - "y": 388 - }, - "angle": 0, - "id": "a25bbb4e-093f-4238-a620-31efdee452dc", - "z": 1, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "Encrypt the DB credentials in the configuration file.\n\nExpire and replace the DB credentials regularly.", - "description": "The Background Worker configuration stores the credentials used by the worker to access the DB. An attacker could compromise the Background Worker and get access to the DB credentials.", - "title": "Accessing DB credentials", - "type": "Information disclosure" - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Worker Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 324, - "y": 398 - }, - "angle": 0, - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1", - "z": 2, - "isALog": true, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "description": "An attacker could make an query call on the DB,", - "title": "Unauthorised access", - "type": "Information disclosure", - "mitigation": "Require all queries to be authenticated." - }, - { - "status": "Open", - "severity": "Medium", - "description": "An attacker could obtain the DB credentials and use them to make unauthorised queries.", - "title": "Credential theft", - "type": "Information disclosure", - "mitigation": "Use a firewall to restrict access to the DB to only the Background Worker IP address." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Database" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 52, - "y": 408 - }, - "angle": 0, - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b", - "z": 3, - "threats": [ - { - "status": "Open", - "severity": "High", - "title": "Credentials should be encrypted", - "type": "Information disclosure", - "description": "The Web Application Config stores credentials used by the Web App to access the message queue. These could be stolen by an attacker and used to read confidential data or place poison messages on the queue.", - "mitigation": "The Message Queue credentials should be encrypted." - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "outOfScope": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Web Application Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 408, - "y": 28 - }, - "angle": 0, - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067", - "z": 4, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Message secrecy", - "type": "Information disclosure", - "description": "The data flow between the Web Application and the Background Worker is not point-to-point and therefore end-to-end secrecy cannot be provided at the transport layer. Messages could be read by an attacker at rest in the Message Queue.", - "mitigation": "Use message level encryption for high sensitivity data (e.g. security tokens) in messages." - }, - { - "status": "Open", - "severity": "Medium", - "title": "Message tampering", - "type": "Tampering", - "description": "Messages on the queue could be tampered with, causing incorrect processing by the Background Worker.", - "mitigation": "Sign all queue messages at the Web Server. Validate the message signature at the Background Worker and reject any message with a missing or invalid signature. Log any failed messages." - }, - { - "status": "Mitigated", - "severity": "High", - "title": "Fake messages could be placed on the queue", - "type": "Spoofing", - "description": "An attacker could put a fake message on queue, causing the Background Worker to do incorrect processing.", - "mitigation": "Restrict access to the queue to the IP addresses of the Web Server and Background Worker.\n\nImplement authentication on the queue endpoint." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Message Queue" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 598, - "y": 179 - }, - "angle": 0, - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3", - "z": 5, - "threats": [ - { - "status": "Open", - "severity": "Medium", - "title": "Poison messages 1", - "type": "Denial of service", - "description": "An attacker could generate a malicious message that the Background Worker cannot process.", - "mitigation": "Implement a poison message queue where messages are placed after a fixed number of retries." - }, - { - "status": "Open", - "severity": "Medium", - "mitigation": "Validate the content of all messages, before processing. Reject any message that have invalid content and log the rejection. Do not log the malicious content - instead log a description of the error.", - "type": "Denial of service", - "title": "Poison messages 2", - "description": "An attacker could generate a malicious message that the Background Worker cannot process." - } - ], - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Background\nWorker Process" - }, - "#element-shape": { - "class": "" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 215, - "y": 181 - }, - "angle": 0, - "id": "0d9909ea-1398-4898-be81-cf1c808324dc", - "z": 6, - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Web\nApplication" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Actor", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 26, - "y": 38 - }, - "angle": 0, - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce", - "z": 7, - "threats": [], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Browser" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 130, - "y": 232 - }, - "target": { - "x": 291, - "y": 150 - }, - "vertices": [ - { - "x": 177, - "y": 149 - } - ], - "id": "64d52ab0-9733-4ae9-af1b-a347cbc13186", - "z": 8, - "attrs": {} - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 339, - "y": 8 - }, - "target": { - "x": 420, - "y": 174 - }, - "vertices": [ - { - "x": 333, - "y": 117 - } - ], - "id": "70a1b898-4131-462f-a26e-1adf9f2b2eda", - "z": 9, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 245, - "y": 112 - } - ], - "id": "56b56e8c-751d-4d8a-a9c7-6554c9f142ee", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Request", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 10, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "isPublicNetwork": true, - "isEncrypted": true, - "protocol": "HTTP/S", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "vertices": [ - { - "x": 351, - "y": 120 - } - ], - "id": "86347588-6629-45e3-a441-09ca11bce894", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Put Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 13, - "threats": [ - { - "status": "Open", - "severity": "High", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 645, - "y": 110 - } - ], - "id": "4bbf279c-49c7-436d-9afa-e94435e6ec72", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 14, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", - "type": "Information disclosure", - "title": "Data flow should use HTTP/S", - "description": "These requests are made over the public internet and could be intercepted by an attacker." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 551, - "y": 178 - }, - "target": { - "x": 753, - "y": 125 - }, - "vertices": [ - { - "x": 635, - "y": 124 - } - ], - "id": "cc656830-4c72-4ede-8f3b-0daeaa399d16", - "z": 15, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 489, - "y": 342 - } - ], - "id": "75949d2c-0449-4a10-add3-07ac91a0c608", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Worker Query Results", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 17, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Man in the middle attack", - "type": "Information disclosure", - "mitigation": "Enforce an encrypted connection at the DB server", - "description": "An attacker could intercept the DB queries in transit and obtain sensitive information, such as DB credentials, query parameters or query results (is unlikely since the data flow is over a private network)." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 253, - "y": 380 - }, - "target": { - "x": 560, - "y": 442 - }, - "vertices": [ - { - "x": 333, - "y": 288 - }, - { - "x": 475, - "y": 276 - } - ], - "id": "a61cbe16-7e3f-400c-a0ea-c0695253c6ad", - "z": 18, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "vertices": [ - { - "x": 111, - "y": 175 - } - ], - "id": "1b1cf1eb-d9ac-463b-a9ae-d816c42e7107", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Response", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 19, - "isEncrypted": true, - "isPublicNetwork": true, - "protocol": "HTTP/S", - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These responses are over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 157, - "y": 292 - } - ], - "id": "c8c746d8-2a26-464e-8524-3350be8dcae5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read web app config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 20, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "a25bbb4e-093f-4238-a620-31efdee452dc" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 664, - "y": 320 - } - ], - "id": "6cba52e8-0d26-481f-bcc1-dbf0b66d8b42", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read worker config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 21, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "vertices": [ - { - "x": 311, - "y": 324 - } - ], - "id": "2fd00bd2-c603-4d72-a12f-c20a3a1ba77b", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Queries", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 22, - "hasOpenThreats": false, - "isEncrypted": true, - "isPublicNetwork": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 377, - "y": 280 - } - ], - "id": "d117ddba-2508-45ce-b9ea-fb9df56a79e5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web App Query\nResults", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 23, - "hasOpenThreats": false, - "isEncrypted": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "target": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "vertices": [ - { - "x": 552, - "y": 382 - } - ], - "id": "015880b7-fb7a-4fe3-b729-fbd40bd7afcb", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Worker Queries", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 24, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - } - ] - }, - "size": { - "height": 594, - "width": 869 - } - } - ], - "reviewer": "Jane Smith" - } -} diff --git a/ThreatDragonModels/legacy_model_1/legacy_model_1.json b/ThreatDragonModels/legacy_model_1/legacy_model_1.json deleted file mode 100644 index dceeb6680..000000000 --- a/ThreatDragonModels/legacy_model_1/legacy_model_1.json +++ /dev/null @@ -1,770 +0,0 @@ -{ - "summary": { - "title": "Demo Threat Model", - "owner": "Mike Goodwin", - "description": "A sample model of a web application, with a queue-decoupled background process.", - "id": 0 - }, - "detail": { - "contributors": [ - { - "name": "Tom Brown" - } - ], - "diagrams": [ - { - "title": "Main Request Flow", - "thumbnail": "./public/content/images/thumbnail.stride.jpg", - "diagramType": "STRIDE", - "id": 0, - "diagramJson": { - "cells": [ - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 659, - "y": 361 - }, - "angle": 0, - "id": "a25bbb4e-093f-4238-a620-31efdee452dc", - "z": 1, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "Encrypt the DB credentials in the configuration file.\n\nExpire and replace the DB credentials regularly.", - "description": "The Background Worker configuration stores the credentials used by the worker to access the DB. An attacker could compromise the Background Worker and get access to the DB credentials.", - "title": "Accessing DB credentials", - "type": "Information disclosure" - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Worker Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 328, - "y": 372 - }, - "angle": 0, - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1", - "z": 2, - "isALog": true, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "description": "An attacker could make an query call on the DB,", - "title": "Unauthorised access", - "type": "Information disclosure", - "mitigation": "Require all queries to be authenticated." - }, - { - "status": "Open", - "severity": "Medium", - "description": "An attacker could obtain the DB credentials ans use them to make unauthorised queries.", - "title": "Credential theft", - "type": "Information disclosure", - "mitigation": "Use a firewall to restrict access to the DB to only the Background Worker IP address." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Database" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 67, - "y": 368 - }, - "angle": 0, - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b", - "z": 3, - "threats": [ - { - "status": "Open", - "severity": "High", - "title": "Credentials should be encrypted", - "type": "Information disclosure", - "description": "The Web Application Config stores credentials used by the Web App to access the message queue. These could be stolen by an attacker and used to read confidential data or place poison message on the queue.", - "mitigation": "The Message Queue credentials should be encrypted." - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "outOfScope": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Web Application Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 419, - "y": 25 - }, - "angle": 0, - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067", - "z": 4, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Message secrecy", - "type": "Information disclosure", - "description": "The data flow between the Web Application and the Background Worker is not point-to-point and therefore end-to-end secrecy cannot be provided at the transport layer. Messages could be read by an attacker at rest in the Message Queue.", - "mitigation": "Use message level encryption for high sensitivity data (e.g. security tokens) in messages." - }, - { - "status": "Open", - "severity": "Medium", - "title": "Message tampering", - "type": "Tampering", - "description": "Messages on the queue could be tampered with, causing incorrect processing by the Background Worker.", - "mitigation": "Sign all queue messages at the Web Server. Validate the message signature at the Background Worker and reject any message with a missing or invalid signature. Log any failed messages." - }, - { - "status": "Mitigated", - "severity": "High", - "title": "Fake messages could be placed on the queue", - "type": "Spoofing", - "description": "An attacker could put a fake message on queue, causing the Background Worker to do incorrect processing.", - "mitigation": "Restrict access to the queue to the IP addresses of the Web Server and Background Worker.\n\nImplement authentication on the queue endpoint." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Message Queue" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 664, - "y": 151 - }, - "angle": 0, - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3", - "z": 5, - "threats": [ - { - "status": "Open", - "severity": "Medium", - "title": "Poison messages 1", - "type": "Denial of service", - "description": "An attacker could generate a malicious message that the Background Worker cannot process.", - "mitigation": "Implement a poison message queue where messages are placed after a fixed number of retries.", - "$$hashKey": "object:245" - }, - { - "status": "Open", - "severity": "Medium", - "mitigation": "Validate the content of all messages, before processing. Reject any message that have invalid content and log the rejection. Do not log the malicious content - instead log a description of the error.", - "type": "Denial of service", - "title": "Poison messages 2", - "description": "An attacker could generate a malicious message that the Background Worker cannot process." - } - ], - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Background\nWorker Process" - }, - "#element-shape": { - "class": "" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 225, - "y": 179 - }, - "angle": 0, - "id": "0d9909ea-1398-4898-be81-cf1c808324dc", - "z": 6, - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Web\nApplication" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Actor", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 27, - "y": 30 - }, - "angle": 0, - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce", - "z": 7, - "threats": [], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Browser" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 115, - "y": 231 - }, - "target": { - "x": 291, - "y": 150 - }, - "vertices": [ - { - "x": 177, - "y": 149 - } - ], - "id": "64d52ab0-9733-4ae9-af1b-a347cbc13186", - "z": 8, - "attrs": {} - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 339, - "y": 8 - }, - "target": { - "x": 410, - "y": 148 - }, - "vertices": [ - { - "x": 333, - "y": 117 - } - ], - "id": "70a1b898-4131-462f-a26e-1adf9f2b2eda", - "z": 9, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 245, - "y": 112 - } - ], - "id": "56b56e8c-751d-4d8a-a9c7-6554c9f142ee", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Request", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 10, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "isPublicNetwork": true, - "isEncrypted": true, - "protocol": "HTTP/S", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "vertices": [ - { - "x": 351, - "y": 120 - } - ], - "id": "86347588-6629-45e3-a441-09ca11bce894", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Put Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 13, - "threats": [ - { - "status": "Open", - "severity": "High", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 645, - "y": 110 - } - ], - "id": "4bbf279c-49c7-436d-9afa-e94435e6ec72", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 14, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", - "type": "Information disclosure", - "title": "Data flow should use HTTP/S", - "description": "These requests are made over the public internet and could be intercepted by an attacker." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 551, - "y": 178 - }, - "target": { - "x": 753, - "y": 125 - }, - "vertices": [ - { - "x": 635, - "y": 124 - } - ], - "id": "cc656830-4c72-4ede-8f3b-0daeaa399d16", - "z": 15, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 533, - "y": 254 - } - ], - "id": "75949d2c-0449-4a10-add3-07ac91a0c608", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Query Results", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 17, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Man in the middle attack", - "type": "Information disclosure", - "mitigation": "Enforce an encrypted connection at the DB server", - "description": "An attacker could intercept the DB queries in transit and obtain sensitive information, such as DB credentials, query parameters or query results (is unlikely since the data flow is over a private network)." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 398, - "y": 258 - }, - "target": { - "x": 592, - "y": 362 - }, - "vertices": [ - { - "x": 507, - "y": 286 - } - ], - "id": "a61cbe16-7e3f-400c-a0ea-c0695253c6ad", - "z": 18, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "vertices": [ - { - "x": 111, - "y": 175 - } - ], - "id": "1b1cf1eb-d9ac-463b-a9ae-d816c42e7107", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Response", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 19, - "isEncrypted": true, - "isPublicNetwork": true, - "protocol": "HTTP/S", - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These responses are over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 157, - "y": 292 - } - ], - "id": "c8c746d8-2a26-464e-8524-3350be8dcae5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read web app config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 20, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "a25bbb4e-093f-4238-a620-31efdee452dc" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 774, - "y": 295 - } - ], - "id": "6cba52e8-0d26-481f-bcc1-dbf0b66d8b42", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read worker config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 21, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - } - ] - }, - "size": { - "height": 590, - "width": 851.3660278320312 - } - } - ], - "reviewer": "Jane Smith" - } -} \ No newline at end of file diff --git a/ThreatDragonModels/legacy_model_2/legacy_model_2.json b/ThreatDragonModels/legacy_model_2/legacy_model_2.json deleted file mode 100644 index b6642bb53..000000000 --- a/ThreatDragonModels/legacy_model_2/legacy_model_2.json +++ /dev/null @@ -1,775 +0,0 @@ -{ - "summary": { - "title": "Demo_Threat_Model", - "owner": "Mike Goodwin", - "description": "A sample model of a web application, with a queue-decoupled background process.", - "id": 0 - }, - "detail": { - "contributors": [ - { - "name": "Tom Brown" - } - ], - "diagrams": [ - { - "title": "Main Request Flow", - "thumbnail": "./public/content/images/thumbnail.stride.jpg", - "diagramType": "STRIDE", - "id": 0, - "diagramJson": { - "cells": [ - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 631, - "y": 373 - }, - "angle": 0, - "id": "a25bbb4e-093f-4238-a620-31efdee452dc", - "z": 1, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "Encrypt the DB credentials in the configuration file.\n\nExpire and replace the DB credentials regularly.", - "description": "The Background Worker configuration stores the credentials used by the worker to access the DB. An attacker could compromise the Background Worker and get access to the DB credentials.", - "title": "Accessing DB credentials", - "type": "Information disclosure" - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Worker Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 328, - "y": 372 - }, - "angle": 0, - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1", - "z": 2, - "isALog": true, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "description": "An attacker could make an query call on the DB,", - "title": "Unauthorised access", - "type": "Information disclosure", - "mitigation": "Require all queries to be authenticated." - }, - { - "status": "Open", - "severity": "Medium", - "description": "An attacker could obtain the DB credentials ans use them to make unauthorised queries.", - "title": "Credential theft", - "type": "Information disclosure", - "mitigation": "Use a firewall to restrict access to the DB to only the Background Worker IP address." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Database" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 67, - "y": 368 - }, - "angle": 0, - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b", - "z": 3, - "threats": [ - { - "status": "Open", - "severity": "High", - "title": "Credentials should be encrypted", - "type": "Information disclosure", - "description": "The Web Application Config stores credentials used by the Web App to access the message queue. These could be stolen by an attacker and used to read confidential data or place poison message on the queue.", - "mitigation": "The Message Queue credentials should be encrypted." - } - ], - "storesCredentials": true, - "hasOpenThreats": true, - "outOfScope": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Web Application Config" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Store", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 409, - "y": 36 - }, - "angle": 0, - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067", - "z": 4, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Message secrecy", - "type": "Information disclosure", - "description": "The data flow between the Web Application and the Background Worker is not point-to-point and therefore end-to-end secrecy cannot be provided at the transport layer. Messages could be read by an attacker at rest in the Message Queue.", - "mitigation": "Use message level encryption for high sensitivity data (e.g. security tokens) in messages." - }, - { - "status": "Open", - "severity": "Medium", - "title": "Message tampering", - "type": "Tampering", - "description": "Messages on the queue could be tampered with, causing incorrect processing by the Background Worker.", - "mitigation": "Sign all queue messages at the Web Server. Validate the message signature at the Background Worker and reject any message with a missing or invalid signature. Log any failed messages." - }, - { - "status": "Mitigated", - "severity": "High", - "title": "Fake messages could be placed on the queue", - "type": "Spoofing", - "description": "An attacker could put a fake message on queue, causing the Background Worker to do incorrect processing.", - "mitigation": "Restrict access to the queue to the IP addresses of the Web Server and Background Worker.\n\nImplement authentication on the queue endpoint." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Message Queue" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 664, - "y": 151 - }, - "angle": 0, - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3", - "z": 5, - "threats": [ - { - "status": "Open", - "severity": "Medium", - "title": "Poison messages 1", - "type": "Denial of service", - "description": "An attacker could generate a malicious message that the Background Worker cannot process.", - "mitigation": "Implement a poison message queue where messages are placed after a fixed number of retries." - }, - { - "status": "Open", - "severity": "Medium", - "mitigation": "Validate the content of all messages, before processing. Reject any message that have invalid content and log the rejection. Do not log the malicious content - instead log a description of the error.", - "type": "Denial of service", - "title": "Poison messages 2", - "description": "An attacker could generate a malicious message that the Background Worker cannot process." - } - ], - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".element-shape": { - "class": "element-shape hasOpenThreats isInScope" - }, - "text": { - "text": "Background\nWorker Process" - }, - "#element-shape": { - "class": "" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Process", - "size": { - "width": 100, - "height": 100 - }, - "position": { - "x": 225, - "y": 179 - }, - "angle": 0, - "id": "0d9909ea-1398-4898-be81-cf1c808324dc", - "z": 6, - "privilegeLevel": "executionContext =Limited", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Web\nApplication" - }, - "#element-process": { - "class": "outOfScopeElement" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Actor", - "size": { - "width": 160, - "height": 80 - }, - "position": { - "x": 27, - "y": 30 - }, - "angle": 0, - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce", - "z": 7, - "threats": [], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".element-shape": { - "class": "element-shape hasNoOpenThreats isInScope" - }, - "text": { - "text": "Browser" - }, - "#element-shape": { - "class": "" - }, - ".undefined": { - "class": "undefinedhasNoOpenThreats isInScope" - }, - ".element-text": { - "class": "element-text hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 115, - "y": 231 - }, - "target": { - "x": 291, - "y": 150 - }, - "vertices": [ - { - "x": 177, - "y": 149 - } - ], - "id": "64d52ab0-9733-4ae9-af1b-a347cbc13186", - "z": 8, - "attrs": {} - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 339, - "y": 8 - }, - "target": { - "x": 410, - "y": 148 - }, - "vertices": [ - { - "x": 333, - "y": 117 - } - ], - "id": "70a1b898-4131-462f-a26e-1adf9f2b2eda", - "z": 9, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 245, - "y": 112 - } - ], - "id": "56b56e8c-751d-4d8a-a9c7-6554c9f142ee", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Request", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 10, - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "isPublicNetwork": true, - "isEncrypted": true, - "protocol": "HTTP/S", - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "vertices": [ - { - "x": 351, - "y": 120 - } - ], - "id": "86347588-6629-45e3-a441-09ca11bce894", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Put Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 13, - "threats": [ - { - "status": "Open", - "severity": "High", - "description": "These requests are made over the public internet and could be intercepted by an attacker.", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "ec574fb4-87e7-494b-88dc-2a3c99172067" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 645, - "y": 110 - } - ], - "id": "4bbf279c-49c7-436d-9afa-e94435e6ec72", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Message", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 14, - "threats": [ - { - "status": "Open", - "severity": "High", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", - "type": "Information disclosure", - "title": "Data flow should use HTTP/S", - "description": "These requests are made over the public internet and could be intercepted by an attacker." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 551, - "y": 178 - }, - "target": { - "x": 753, - "y": 125 - }, - "vertices": [ - { - "x": 635, - "y": 124 - } - ], - "id": "cc656830-4c72-4ede-8f3b-0daeaa399d16", - "z": 15, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 533, - "y": 254 - } - ], - "id": "75949d2c-0449-4a10-add3-07ac91a0c608", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Query Results", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 17, - "threats": [ - { - "status": "Open", - "severity": "Low", - "title": "Man in the middle attack", - "type": "Information disclosure", - "mitigation": "Enforce an encrypted connection at the DB server", - "description": "An attacker could intercept the DB queries in transit and obtain sensitive information, such as DB credentials, query parameters or query results (is unlikely since the data flow is over a private network)." - } - ], - "outOfScope": false, - "hasOpenThreats": true, - "attrs": { - ".marker-target": { - "class": "marker-target hasOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasOpenThreats isInScope" - } - } - }, - { - "type": "tm.Boundary", - "smooth": true, - "source": { - "x": 398, - "y": 258 - }, - "target": { - "x": 592, - "y": 362 - }, - "vertices": [ - { - "x": 507, - "y": 286 - } - ], - "id": "a61cbe16-7e3f-400c-a0ea-c0695253c6ad", - "z": 18, - "attrs": {} - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "target": { - "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" - }, - "vertices": [ - { - "x": 111, - "y": 175 - } - ], - "id": "1b1cf1eb-d9ac-463b-a9ae-d816c42e7107", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Web Response", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 19, - "isEncrypted": true, - "isPublicNetwork": true, - "protocol": "HTTP/S", - "threats": [ - { - "status": "Mitigated", - "severity": "High", - "title": "Data flow should use HTTP/S", - "type": "Information disclosure", - "description": "These responses are over the public internet and could be intercepted by an attacker.", - "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported." - } - ], - "outOfScope": false, - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isInScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "bdd3e115-4b92-4020-90b7-c3351dba292b" - }, - "target": { - "id": "0d9909ea-1398-4898-be81-cf1c808324dc" - }, - "vertices": [ - { - "x": 157, - "y": 292 - } - ], - "id": "c8c746d8-2a26-464e-8524-3350be8dcae5", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read web app config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 20, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - }, - { - "type": "tm.Flow", - "smooth": true, - "source": { - "id": "a25bbb4e-093f-4238-a620-31efdee452dc" - }, - "target": { - "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3" - }, - "vertices": [ - { - "x": 774, - "y": 295 - } - ], - "id": "6cba52e8-0d26-481f-bcc1-dbf0b66d8b42", - "labels": [ - { - "position": 0.5, - "attrs": { - "text": { - "text": "Read worker config", - "font-weight": "400", - "font-size": "small" - } - } - } - ], - "z": 21, - "outOfScope": true, - "reasonOutOfScope": "This data flow represents a read from the file system", - "hasOpenThreats": false, - "attrs": { - ".marker-target": { - "class": "marker-target hasNoOpenThreats isInScope" - }, - ".connection": { - "class": "connection hasNoOpenThreats isOutOfScope" - } - } - } - ] - }, - "size": { - "height": 594, - "width": 851.3660278320312 - } - } - ], - "reviewer": "Jane Smith" - }, - "location": { - "organisation": "mike-goodwin", - "repo": "owasp-threat-dragon-demo", - "branch": "master", - "model": "Demo_Threat_Model" - } -} diff --git a/ThreatDragonModels/new-model/new-model.json b/ThreatDragonModels/new-model.json similarity index 100% rename from ThreatDragonModels/new-model/new-model.json rename to ThreatDragonModels/new-model.json diff --git a/ThreatDragonModels/v2-new-model.json b/ThreatDragonModels/v2-new-model.json new file mode 100644 index 000000000..6043c3242 --- /dev/null +++ b/ThreatDragonModels/v2-new-model.json @@ -0,0 +1,10 @@ +{ + "version": "2.0", + "summary": { + "title":"New threat model" + }, + "detail": { + "contributors": [], + "diagrams": [] + } +} diff --git a/ThreatDragonModels/v2-threat-model.json b/ThreatDragonModels/v2-threat-model.json new file mode 100644 index 000000000..7cc772cc8 --- /dev/null +++ b/ThreatDragonModels/v2-threat-model.json @@ -0,0 +1,1120 @@ +{ + "summary": { + "title": "Demo Threat Model", + "owner": "Mike Goodwin", + "description": "A sample model of a web application, with a queue-decoupled background process.", + "id": 0 + }, + "detail": { + "contributors": [ + { + "name": "Tom Brown" + }, + { + "name": "Albert Moneypenny" + } + ], + "diagrams": [ + { + "cells": [ + { + "position": { + "x": 565, + "y": 414 + }, + "size": { + "width": 160, + "height": 80 + }, + "attrs": { + "text": { + "text": "Worker Config" + }, + "topLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + }, + "bottomLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + } + }, + "shape": "store", + "id": "a25bbb4e-093f-4238-a620-31efdee452dc", + "zIndex": 1, + "data": { + "name": "Worker Config", + "description": "", + "type": "tm.Store", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [ + { + "status": "Open", + "severity": "High", + "mitigation": "Encrypt the DB credentials in the configuration file.\n\nExpire and replace the DB credentials regularly.", + "description": "The Background Worker configuration stores the credentials used by the worker to access the DB. An attacker could compromise the Background Worker and get access to the DB credentials.", + "title": "Accessing DB credentials", + "type": "Information disclosure", + "modelType": "STRIDE", + "id": "7df716cd-a982-48a5-b4ed-800ccb670734" + } + ], + "hasOpenThreats": true, + "isALog": false, + "storesCredentials": true, + "isEncrypted": false, + "isSigned": false + } + }, + { + "position": { + "x": 290, + "y": 420 + }, + "size": { + "width": 160, + "height": 80 + }, + "attrs": { + "text": { + "text": "Database" + }, + "topLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + }, + "bottomLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + } + }, + "shape": "store", + "id": "936557f9-22e2-4bac-bb70-0089c5c2fbe1", + "zIndex": 2, + "data": { + "name": "Database", + "description": "", + "type": "tm.Store", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [ + { + "status": "Mitigated", + "severity": "High", + "description": "An attacker could make an query call on the DB,", + "title": "Unauthorised access", + "type": "Information disclosure", + "mitigation": "Require all queries to be authenticated.", + "modelType": "STRIDE", + "id": "21fc4b20-ca29-4891-9691-d8f0331b2a11" + }, + { + "status": "Open", + "severity": "Medium", + "description": "An attacker could obtain the DB credentials ans use them to make unauthorised queries.", + "title": "Credential theft", + "type": "Information disclosure", + "mitigation": "Use a firewall to restrict access to the DB to only the Background Worker IP address.", + "modelType": "STRIDE", + "id": "e12765bf-ec61-47d8-8e9f-6bb3f5adab47" + } + ], + "hasOpenThreats": true, + "isALog": true, + "storesCredentials": false, + "isEncrypted": false, + "isSigned": false + } + }, + { + "position": { + "x": 40, + "y": 420 + }, + "size": { + "width": 160, + "height": 80 + }, + "attrs": { + "text": { + "text": "Web Application Config" + }, + "topLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + }, + "bottomLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + } + }, + "shape": "store", + "id": "bdd3e115-4b92-4020-90b7-c3351dba292b", + "zIndex": 3, + "data": { + "name": "Web Application Config", + "description": "", + "type": "tm.Store", + "isTrustBoundary": false, + "outOfScope": true, + "reasonOutOfScope": "", + "threats": [ + { + "status": "Open", + "severity": "High", + "title": "Credentials should be encrypted", + "type": "Information disclosure", + "description": "The Web Application Config stores credentials used by the Web App to access the message queue. These could be stolen by an attacker and used to read confidential data or place poison message on the queue.", + "mitigation": "The Message Queue credentials should be encrypted.", + "modelType": "STRIDE", + "id": "aaea0238-2984-4b25-8268-3798e63bed34" + } + ], + "hasOpenThreats": true, + "isALog": false, + "storesCredentials": true, + "isEncrypted": false, + "isSigned": false + } + }, + { + "position": { + "x": 502, + "y": 13 + }, + "size": { + "width": 160, + "height": 80 + }, + "attrs": { + "text": { + "text": "Message Queue" + }, + "topLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + }, + "bottomLine": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + } + }, + "shape": "store", + "id": "ec574fb4-87e7-494b-88dc-2a3c99172067", + "zIndex": 4, + "data": { + "name": "Message Queue", + "description": "", + "type": "tm.Store", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [ + { + "status": "Open", + "severity": "Low", + "title": "Message secrecy", + "type": "Information disclosure", + "description": "The data flow between the Web Application and the Background Worker is not point-to-point and therefore end-to-end secrecy cannot be provided at the transport layer. Messages could be read by an attacker at rest in the Message Queue.", + "mitigation": "Use message level encryption for high sensitivity data (e.g. security tokens) in messages.", + "modelType": "STRIDE", + "id": "7bc090cc-50a1-44aa-8481-5e4daaa6d8ba" + }, + { + "status": "Open", + "severity": "Medium", + "title": "Message tampering", + "type": "Tampering", + "description": "Messages on the queue could be tampered with, causing incorrect processing by the Background Worker.", + "mitigation": "Sign all queue messages at the Web Server. Validate the message signature at the Background Worker and reject any message with a missing or invalid signature. Log any failed messages.", + "modelType": "STRIDE", + "id": "52ba8c1d-8376-4ede-942d-e575d71eaef5" + }, + { + "status": "Mitigated", + "severity": "High", + "title": "Fake messages could be placed on the queue", + "type": "Spoofing", + "description": "An attacker could put a fake message on queue, causing the Background Worker to do incorrect processing.", + "mitigation": "Restrict access to the queue to the IP addresses of the Web Server and Background Worker.\n\nImplement authentication on the queue endpoint.", + "modelType": "STRIDE", + "id": "b917c6dd-e2d5-455c-8b81-61407126abfa" + } + ], + "hasOpenThreats": true, + "isALog": false, + "storesCredentials": false, + "isEncrypted": false, + "isSigned": false + } + }, + { + "position": { + "x": 560, + "y": 180 + }, + "size": { + "width": 100, + "height": 100 + }, + "attrs": { + "text": { + "text": "Background\nWorker Process" + }, + "body": { + "stroke": "red", + "strokeWidth": 3, + "strokeDasharray": null + } + }, + "shape": "process", + "zIndex": 5, + "id": "3e75b596-9c70-41b6-a2cf-a15899c254d3", + "data": { + "name": "Background\nWorker Process", + "description": "", + "type": "tm.Process", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [ + { + "status": "Open", + "severity": "Medium", + "title": "Poison messages 1", + "type": "Denial of service", + "description": "An attacker could generate a malicious message that the Background Worker cannot process.", + "mitigation": "Implement a poison message queue where messages are placed after a fixed number of retries.", + "modelType": "STRIDE", + "id": "1468b37f-3ff9-4079-8767-f33bbfe0a887" + }, + { + "status": "Open", + "severity": "Medium", + "mitigation": "Validate the content of all messages, before processing. Reject any message that have invalid content and log the rejection. Do not log the malicious content - instead log a description of the error.", + "type": "Denial of service", + "title": "Poison messages 2", + "description": "An attacker could generate a malicious message that the Background Worker cannot process.", + "modelType": "STRIDE", + "id": "3c8033db-0e51-42c0-afd0-d01d2ced4a14" + } + ], + "hasOpenThreats": true + } + }, + { + "position": { + "x": 210, + "y": 180 + }, + "size": { + "width": 100, + "height": 100 + }, + "attrs": { + "text": { + "text": "Web\nApplication" + }, + "body": { + "stroke": "#333333", + "strokeWidth": 1, + "strokeDasharray": null + } + }, + "shape": "process", + "zIndex": 6, + "id": "0d9909ea-1398-4898-be81-cf1c808324dc", + "data": { + "name": "Web\nApplication", + "description": "", + "type": "tm.Process", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [], + "hasOpenThreats": false + } + }, + { + "position": { + "x": 40, + "y": 29 + }, + "size": { + "width": 160, + "height": 80 + }, + "attrs": { + "text": { + "text": "Browser" + }, + "body": { + "stroke": "#333333", + "strokeWidth": 1, + "strokeDasharray": null + } + }, + "shape": "actor", + "zIndex": 7, + "id": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce", + "data": { + "name": "Browser", + "description": "", + "type": "tm.Actor", + "isTrustBoundary": false, + "outOfScope": false, + "reasonOutOfScope": "", + "threats": [], + "hasOpenThreats": false, + "providesAuthentication": false + } + }, + { + "shape": "trust-broundary-curve", + "attrs": { + "line": { + "targetMarker": "", + "sourceMarker": "" + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "labels": [ + { + "attrs": { + "text": { + "text": "" + } + } + } + ], + "data": { + "type": "tm.Boundary", + "name": "", + "description": "", + "isTrustBoundary": true, + "hasOpenThreats": false + }, + "id": "0adc088b-ebb1-46be-af7b-36112c60c419", + "source": { + "x": 80, + "y": 220 + }, + "target": { + "x": 295, + "y": 51 + }, + "vertices": [ + { + "x": 276, + "y": 149 + } + ] + }, + { + "shape": "trust-broundary-curve", + "attrs": { + "line": { + "targetMarker": "", + "sourceMarker": "" + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "labels": [ + { + "attrs": { + "text": { + "text": "" + } + } + } + ], + "data": { + "type": "tm.Boundary", + "name": "", + "description": "", + "isTrustBoundary": true, + "hasOpenThreats": false + }, + "id": "6767506f-3d7f-4a5f-bbe2-ea03689d30fc", + "source": { + "x": 350, + "y": 10 + }, + "target": { + "x": 663, + "y": 156 + }, + "vertices": [ + { + "x": 333, + "y": 117 + }, + { + "x": 432, + "y": 180 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Web Request", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "HTTP/S", + "isEncrypted": true, + "isPublicNetwork": true, + "hasOpenThreats": false, + "threats": [ + { + "status": "Mitigated", + "severity": "High", + "title": "Data flow should use HTTP/S", + "type": "Information disclosure", + "description": "These requests are made over the public internet and could be intercepted by an attacker.", + "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", + "modelType": "STRIDE", + "id": "79cbaf10-e5a2-4fd6-9818-7f180a113938" + } + ], + "isTrustBoundary": false + }, + "id": "2d84bfae-f1ed-49e5-8542-10a02f4a1c57", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Web Request (HTTP/S)" + } + } + } + ], + "source": { + "cell": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" + }, + "target": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "vertices": [ + { + "x": 245, + "y": 112 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "red", + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Put Message", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": true, + "threats": [ + { + "status": "Open", + "severity": "High", + "description": "These requests are made over the public internet and could be intercepted by an attacker.", + "title": "Data flow should use HTTP/S", + "type": "Information disclosure", + "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", + "modelType": "STRIDE", + "id": "f8cc4477-653f-4e4a-a0cb-7b90f046fd7b" + } + ], + "isTrustBoundary": false + }, + "id": "c779a822-d4ec-4237-9191-fe7170b32956", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Put Message" + } + } + } + ], + "source": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "target": { + "cell": "ec574fb4-87e7-494b-88dc-2a3c99172067" + }, + "vertices": [ + { + "x": 351, + "y": 120 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "red", + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Message", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": true, + "threats": [ + { + "status": "Open", + "severity": "High", + "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", + "type": "Information disclosure", + "title": "Data flow should use HTTP/S", + "description": "These requests are made over the public internet and could be intercepted by an attacker.", + "modelType": "STRIDE", + "id": "2fcfb064-6a08-4771-9d9d-342639d63d7b" + } + ], + "isTrustBoundary": false + }, + "id": "552b5603-41c9-4458-83f2-01a6490a41b8", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Message" + } + } + } + ], + "source": { + "cell": "ec574fb4-87e7-494b-88dc-2a3c99172067" + }, + "target": { + "cell": "3e75b596-9c70-41b6-a2cf-a15899c254d3" + }, + "vertices": [ + { + "x": 544, + "y": 127 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "red", + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Worker Query Results", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": true, + "threats": [ + { + "status": "Open", + "severity": "Low", + "title": "Man in the middle attack", + "type": "Information disclosure", + "mitigation": "Enforce an encrypted connection at the DB server", + "description": "An attacker could intercept the DB queries in transit and obtain sensitive information, such as DB credentials, query parameters or query results (is unlikely since the data flow is over a private network).", + "modelType": "STRIDE", + "id": "72b9712b-2c08-40b1-aea6-57604e82f5f4" + } + ], + "isTrustBoundary": false + }, + "id": "1d981aac-90a7-464e-9491-3456bc6e593c", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Worker Query Results" + } + } + } + ], + "source": { + "cell": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" + }, + "target": { + "cell": "3e75b596-9c70-41b6-a2cf-a15899c254d3" + }, + "vertices": [ + { + "x": 466, + "y": 347 + } + ] + }, + { + "shape": "trust-broundary-curve", + "attrs": { + "line": { + "targetMarker": "", + "sourceMarker": "" + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "labels": [ + { + "attrs": { + "text": { + "text": "" + } + } + } + ], + "data": { + "type": "tm.Boundary", + "name": "", + "description": "", + "isTrustBoundary": true, + "hasOpenThreats": false + }, + "id": "4a7911c8-2493-46cc-960f-1b248b176d15", + "source": { + "x": 241, + "y": 444 + }, + "target": { + "x": 526, + "y": 465 + }, + "vertices": [ + { + "x": 333, + "y": 288 + }, + { + "x": 488, + "y": 267 + }, + { + "x": 552, + "y": 339 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Web Response", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "HTTP/S", + "isEncrypted": true, + "isPublicNetwork": true, + "hasOpenThreats": false, + "threats": [ + { + "status": "Mitigated", + "severity": "High", + "title": "Data flow should use HTTP/S", + "type": "Information disclosure", + "description": "These responses are over the public internet and could be intercepted by an attacker.", + "mitigation": "The requests should require HTTP/S. This will provide confidentiality and integrity. HTTP should not be supported.", + "modelType": "STRIDE", + "id": "2cba4931-e49c-4d4c-ad7c-d2de4875f15a" + } + ], + "isTrustBoundary": false + }, + "id": "28d7c778-8fdf-43d6-9461-b25281743883", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Web Response (HTTP/S)" + } + } + } + ], + "source": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "target": { + "cell": "b394f9f7-07ca-42bc-b616-ad77c6fbfcce" + }, + "vertices": [ + { + "x": 111, + "y": 175 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": "2 2" + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Read web app config", + "description": "", + "outOfScope": true, + "reasonOutOfScope": "This data flow represents a read from the file system", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": false, + "threats": [], + "isTrustBoundary": false + }, + "id": "7e039c91-9a2e-4ded-890a-0d9bf06c8b47", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Read web app config" + } + } + } + ], + "source": { + "cell": "bdd3e115-4b92-4020-90b7-c3351dba292b" + }, + "target": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "vertices": [ + { + "x": 157, + "y": 292 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": "2 2" + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Read worker config", + "description": "", + "outOfScope": true, + "reasonOutOfScope": "This data flow represents a read from the file system", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": false, + "threats": [], + "isTrustBoundary": false + }, + "id": "9c2171c8-f3aa-48db-91a4-3fa255b7c620", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Read worker config" + } + } + } + ], + "source": { + "cell": "a25bbb4e-093f-4238-a620-31efdee452dc" + }, + "target": { + "cell": "3e75b596-9c70-41b6-a2cf-a15899c254d3" + }, + "vertices": [ + { + "x": 664, + "y": 320 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Queries", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": true, + "isPublicNetwork": false, + "hasOpenThreats": false, + "threats": [], + "isTrustBoundary": false + }, + "id": "8a9007e8-ae66-4568-84c7-9bcbc1e2fdab", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Queries" + } + } + } + ], + "source": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "target": { + "cell": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" + }, + "vertices": [ + { + "x": 311, + "y": 324 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Web App Query\nResults", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": true, + "isPublicNetwork": false, + "hasOpenThreats": false, + "threats": [], + "isTrustBoundary": false + }, + "id": "d071f844-374b-4957-8664-4f53ec0807cc", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Web App Query\nResults" + } + } + } + ], + "source": { + "cell": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" + }, + "target": { + "cell": "0d9909ea-1398-4898-be81-cf1c808324dc" + }, + "vertices": [ + { + "x": 377, + "y": 280 + } + ] + }, + { + "shape": "flow", + "attrs": { + "line": { + "stroke": "#333333", + "strokeWidth": 1, + "targetMarker": { + "name": "classic" + }, + "strokeDasharray": null + } + }, + "width": 200, + "height": 100, + "zIndex": 10, + "connector": "smooth", + "data": { + "type": "tm.Flow", + "name": "Worker Queries", + "description": "", + "outOfScope": false, + "reasonOutOfScope": "", + "protocol": "", + "isEncrypted": false, + "isPublicNetwork": false, + "hasOpenThreats": false, + "threats": [], + "isTrustBoundary": false + }, + "id": "7efaaa0f-402c-4fc7-b9b8-449cfdb10026", + "labels": [ + { + "position": 0.5, + "attrs": { + "label": { + "text": "Worker Queries" + } + } + } + ], + "source": { + "cell": "3e75b596-9c70-41b6-a2cf-a15899c254d3" + }, + "target": { + "cell": "936557f9-22e2-4bac-bb70-0089c5c2fbe1" + }, + "vertices": [ + { + "x": 552, + "y": 382 + } + ] + } + ], + "version": "2.0", + "title": "Main Request Data Flow", + "thumbnail": "./public/content/images/thumbnail.stride.jpg", + "diagramType": "STRIDE", + "id": 0 + } + ], + "reviewer": "Jane Smith" + }, + "version": "2.0" +} diff --git a/td.vue/.gitignore b/td.vue/.gitignore index 0bf76901c..7c73d110f 100644 --- a/td.vue/.gitignore +++ b/td.vue/.gitignore @@ -27,8 +27,9 @@ pnpm-debug.log* *.log tests/e2e/reports/ tests/e2e/videos +tests/e2e/screenshots/ log/ results/ #Electron-builder output -/dist-desktop \ No newline at end of file +/dist-desktop diff --git a/td.vue/src/desktop/desktop.menu.js b/td.vue/src/desktop/desktop.menu.js index 904e267d5..98620bfdd 100644 --- a/td.vue/src/desktop/desktop.menu.js +++ b/td.vue/src/desktop/desktop.menu.js @@ -24,10 +24,10 @@ export const menuTemplate = [ ] }).then(result => { if (result.canceled === false) { - console.log(result.filePaths) + console.log(result.filePaths); } }).catch(err => { - console.log(err) + console.log(err); }); } }, @@ -57,10 +57,10 @@ export const menuTemplate = [ ] }).then(result => { if (result.canceled === false) { - console.log(result.filePath) + console.log(result.filePath); } }).catch(err => { - console.log(err) + console.log(err); }); } }, diff --git a/td.vue/src/service/demo/index.js b/td.vue/src/service/demo/index.js index 004b34462..107476cb7 100644 --- a/td.vue/src/service/demo/index.js +++ b/td.vue/src/service/demo/index.js @@ -1,15 +1,11 @@ import demoThreatModel from './demo-threat-model.js'; -import legacyDesktopModel from './legacy-desktop-model.js'; -import legacyModel2 from './legacy-model-2.js'; -import legacyModel from './legacy-model.js'; -import v2Model from './v2-threat-model.js'; +import v2NewModel from './v2-new-model.js'; +import v2ThreatModel from './v2-threat-model.js'; const models = [ { name: 'Demo Threat Model', model: demoThreatModel }, - { name: 'Legacy Desktop Model', model: legacyDesktopModel }, - { name: 'Legacy Model', model: legacyModel }, - { name: 'Legacy Model 2', model: legacyModel2 }, - { name: 'Version 2 Demo Model', model: v2Model } + { name: 'Version 2 New Model', model: v2NewModel }, + { name: 'Version 2 Demo Model', model: v2ThreatModel } ]; export default { diff --git a/td.vue/src/service/demo/v2-new-model.js b/td.vue/src/service/demo/v2-new-model.js new file mode 100644 index 000000000..aec8ccabc --- /dev/null +++ b/td.vue/src/service/demo/v2-new-model.js @@ -0,0 +1,15 @@ +export default{ + 'tdVersion': '2.0', + 'summary': { + 'title': 'New Threat Model', + 'owner': '', + 'description': '', + 'id': 0 + }, + 'detail': { + 'contributors': [], + 'diagrams': [], + 'reviewer': '' + } +}; + diff --git a/td.vue/tests/e2e/specs/demo.js b/td.vue/tests/e2e/specs/demo.js index ea0697b2c..4e9d9c2f8 100644 --- a/td.vue/tests/e2e/specs/demo.js +++ b/td.vue/tests/e2e/specs/demo.js @@ -13,12 +13,8 @@ describe('demo', () => { cy.contains('Demo Threat Model'); }); - it('has the legacy desktop model', () => { - cy.contains('Legacy Desktop Model'); - }); - - it('has the Legacy Model', () => { - cy.contains('Legacy Model'); + it('has the V2 New Model', () => { + cy.contains('Version 2 New Model'); }); it('opens the v2 demo threat model', () => { diff --git a/td.vue/tests/e2e/specs/upgrade.js b/td.vue/tests/e2e/specs/upgrade.js index 07ad90c4f..435d9e854 100644 --- a/td.vue/tests/e2e/specs/upgrade.js +++ b/td.vue/tests/e2e/specs/upgrade.js @@ -13,12 +13,8 @@ describe('upgrade', () => { cy.contains('Demo Threat Model'); }); - it('has the legacy desktop model', () => { - cy.contains('Legacy Desktop Model'); - }); - - it('has the Legacy Model', () => { - cy.contains('Legacy Model'); + it('has the V2 New Model', () => { + cy.contains('Version 2 New Model'); }); it('opens the demo threat model', () => {