Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ disable = "logging-fstring-interpolation"
min-similarity-lines = 10

[tool.pylint.MASTER]
ignored-modules = ["pytm"]
ignore-paths = [
"doc/_build/",
"doc/_ext/sphinxcontrib_asciinema",
Expand Down
23 changes: 23 additions & 0 deletions security/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Security

This folder contains the threat models.

They depend on features not yet in a pytm release; install a pinned commit
until an official release is available:

`pip install git+https://github.com/OWASP/pytm.git@279ed14aa13ea8f0b989717812fd4626bfcddf3d`

To update the pin, verify the new commit in the upstream repository and replace
the SHA above.

After this you can generate various reports using:

```bash
python -m security.tm_supply_chain --report security/report_template.md > report.md
python -m security.tm_supply_chain --dfd
python -m security.tm_supply_chain --seq

python -m security.tm_usage --report security/report_template.md > report_usage.md
python -m security.tm_usage --dfd
python -m security.tm_usage --seq
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Empty file added security/__init__.py
Empty file.
114 changes: 114 additions & 0 deletions security/report_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
## System Description

{tm.description}

## Dataflow Diagram - Level 0 DFD

```dot
{tm.dfd:call:}
```

## Dataflows
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Name|From|To |Data|Protocol|Port
|:----:|:----:|:---:|:----:|:--------:|:----:|
{dataflows:repeat:|{{item.display_name:call:}}|{{item.source.name}}|{{item.sink.name}}|{{item.data}}|{{item.protocol}}|{{item.dstPort}}|
}

## Data Dictionary

{data:repeat:
Name|{{item.name}}
|:----|:----|
Description|{{item.description}}|
Classification|{{item.classification.name}}|
Carried By|{{item.carriedBy:repeat:{{{{item.name}}}}<br>}}|
Processed By|{{item.processedBy:repeat:{{{{item.name}}}}<br>}}|

{{item:call:getInScopeFindings}}
}
Comment thread
ben-edna marked this conversation as resolved.

## Actors

{actors:repeat:
Name|{{item.name}}
|:----|:----|
Description|{{item.description}}|
Is Admin|{{item.isAdmin}}|
Finding Count|{{item:call:getFindingCount}}|

{{item:call:getInScopeFindings}}
}

## Boundaries

{boundaries:repeat:
Name|{{item.name}}
|:----|:----|
Description|{{item.description}}|
In Scope|{{item.inScope}}|
Immediate Parent|{{item.parents:if:{{item:call:getParentName}}}}{{item.parents:not:N/A, primary boundary}}|
All Parents|{{item.parents:call:{{{{item.display_name:call:}}}}, }}|
Classification|{{item.maxClassification}}|
Finding Count|{{item:call:getFindingCount}}|

{{item:call:getInScopeFindings}}
}


## Assets

{assets:repeat:
Name|{{item.name}}
|:----|:----|
Description|{{item.description}}|
In Scope|{{item.inScope}}|
Type|{{item:call:getElementType}}|
Finding Count|{{item:call:getFindingCount}}|

{{item:call:getInScopeFindings}}
}


## Data Flows

{dataflows:repeat:
Name|{{item.name}}
|:----|:----|
Description|{{item.description}}|
Sink|{{item.sink}}|
Source|{{item.source}}|
Is Response|{{item.isResponse}}|
In Scope|{{item.inScope}}|
Finding Count|{{item:call:getFindingCount}}|

{{item:call:getInScopeFindings}}
}


{tm.excluded_findings:if:
# Excluded Threats
}

{tm.excluded_findings:repeat:
<details>
<summary>
{{item:call:getThreatId}} - {{item:call:getFindingDescription}}
</summary>
<p>
<b>{{item:call:getThreatId}}</b> was excluded for
<b>{{item:call:getFindingTarget}}</b>
because of the assumption "{{item.assumption.name}}"
</p>
{{item.assumption.description:if:
<h6>Assumption description</h6>
<p>{{item.assumption.description}}</p>
}}
<h6>Severity</h6>
<p>{{item:call:getFindingSeverity}}</p>
<h6>Example Instances</h6>
<p>{{item:call:getFindingExample}}</p>
<h6>References</h6>
<p>{{item:call:getFindingReferences}}</p>
</details>
}
497 changes: 497 additions & 0 deletions security/threats.json

Large diffs are not rendered by default.

Loading
Loading