Skip to content

Commit 4890300

Browse files
authored
Merge pull request #229 from izar/colormap
Colormap
2 parents 8a16480 + eb9af4a commit 4890300

12 files changed

+360
-71
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ optional arguments:
7676
--exclude EXCLUDE specify threat IDs to be ignored
7777
--seq output sequential diagram
7878
--list list all available threats
79+
--colormap color the risk in the diagram
7980
--describe DESCRIBE describe the properties available for a given element
8081
--list-elements list all elements which can be part of a threat model
8182
--json JSON output a JSON file
@@ -113,6 +114,9 @@ Element class attributes:
113114
114115
```
115116

117+
The *colormap* argument, used together with *dfd*, outputs a color-coded DFD where the elements are painted red, yellow or green depending on their risk level (as identified by running the rules).
118+
119+
116120
## Creating a Threat Model
117121

118122
The following is a sample `tm.py` file that describes a simple application where a User logs into the application
@@ -200,6 +204,8 @@ tm.process()
200204

201205
```
202206

207+
You also have the option of using [pytmGPT](https://chat.openai.com/g/g-soISG24ix-pytmgpt) to create your models from prose!
208+
203209
### Generating Diagrams
204210

205211
Diagrams are output as [Dot](https://graphviz.gitlab.io/) and [PlantUML](https://plantuml.com/).
@@ -303,10 +309,13 @@ user_to_web.overrides = [
303309
threat_id="INP02",
304310
cvss="9.3",
305311
response="""**To Mitigate**: run a memory sanitizer to validate the binary""",
312+
severity="Very High",
306313
)
307314
]
308315
```
309316

317+
If you are adding a Finding, make sure to add a severity: "Very High", "High", "Medium", "Low", "Very Low".
318+
310319
## Threats database
311320

312321
For the security practitioner, you may supply your own threats file by setting `TM.threatsFile`. It should contain entries like:

pytm/images/datastore_black.png

12.9 KB
Loading

pytm/images/datastore_darkgreen.png

3.72 KB
Loading

pytm/images/datastore_firebrick3.png

3.72 KB
Loading

pytm/images/datastore_gold.png

3.71 KB
Loading

0 commit comments

Comments
 (0)