Skip to content

Commit

Permalink
Merge pull request #241 from raphaelahrens/master
Browse files Browse the repository at this point in the history
Added `prerequisites` and `likelihood` to Threat
  • Loading branch information
izar authored Apr 12, 2024
2 parents 8f57ca9 + bd363e9 commit 6ca9f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytm/pytm.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,15 +605,18 @@ class Threat:
to a boolean True or False""",
)
details = varString("")
likelihood = varString("")
severity = varString("")
mitigations = varString("")
prerequisites = varString("")
example = varString("")
references = varString("")
target = ()

def __init__(self, **kwargs):
self.id = kwargs["SID"]
self.description = kwargs.get("description", "")
self.likelihood = kwargs.get("Likelihood Of Attack", "")
self.condition = kwargs.get("condition", "True")
target = kwargs.get("target", "Element")
if not isinstance(target, str) and isinstance(target, Iterable):
Expand All @@ -624,6 +627,7 @@ def __init__(self, **kwargs):
self.details = kwargs.get("details", "")
self.severity = kwargs.get("severity", "")
self.mitigations = kwargs.get("mitigations", "")
self.prerequisites = kwargs.get("prerequisites", "")
self.example = kwargs.get("example", "")
self.references = kwargs.get("references", "")

Expand Down

0 comments on commit 6ca9f75

Please sign in to comment.