flowstrider.models package¶
Submodules¶
flowstrider.models.common_models module¶
- class flowstrider.models.common_models.Cluster(id: str, node_ids: ~typing.Set[str], name: str = '', tags: ~typing.Set[str] = <factory>, attributes: ~typing.Dict[str, ~typing.Any] = <factory>, severity_multiplier: float = 1.0)[source]¶
Bases:
objectRepresents a cluster.
- tags¶
A set of tags used to specify the type of the cluster [“STRIDE:TrustBoundary”].
- Type:
Set[str]
- class flowstrider.models.common_models.Edge(id: str, source_id: str, sink_id: str, name: str = '', tags: ~typing.Set[str] = <factory>, attributes: ~typing.Dict[str, ~typing.Any] = <factory>)[source]¶
Bases:
objectRepresents a edge.
- tags¶
A set of tags used to specify the type of the edge: data flow [STRIDE:Dataflow].
- Type:
Set[str]
- class flowstrider.models.common_models.Node(id: str, name: str = '', tags: ~typing.Set[str] = <factory>, attributes: ~typing.Dict[str, ~typing.Any] = <factory>, severity_multiplier: float = 1.0)[source]¶
Bases:
objectRepresents a node.
- tags¶
A set of tags used to specify the type of the node: datastore, process, or external entity [‘STRIDE:DataStore’, ‘STRIDE:Process’, ‘STRIDE:Interactor’].
- Type:
Set[str]
flowstrider.models.dataflowdiagram module¶
- class flowstrider.models.dataflowdiagram.DataflowDiagram(id: str, nodes: ~typing.Dict[str, ~flowstrider.models.common_models.Node], edges: ~typing.Dict[str, ~flowstrider.models.common_models.Edge], clusters: ~typing.Dict[str, ~flowstrider.models.common_models.Cluster], name: str = '', tags: ~typing.Set[str] = <factory>, attributes: ~typing.Dict[str, ~typing.Any] = <factory>)[source]¶
Bases:
objectRepresents a data flow diagram.
- nodes¶
The nodes in the diagram. These can represent processes, external entities, or data stores.
- clusters¶
The clusters in the diagram. These contain nodes and represent trust boundaries.
- tags¶
A set of tags specifying the rule set to use [‘stride’, ‘bsi_rules’, ‘linddun_rules’].
- Type:
Set[str]
flowstrider.models.threat module¶
- class flowstrider.models.threat.Threat(source: str, source_internal: str, location: flowstrider.models.common_models.Node | flowstrider.models.common_models.Edge | flowstrider.models.dataflowdiagram.DataflowDiagram | str, severity: float, short_description: str, long_description: str, mitigation_options: List[str], requirement: str, req_status: str)[source]¶
Bases:
object- display_id(dfd: DataflowDiagram) str[source]¶
Display identifier for each individal threat; takes names instead of id of elements and is localized; not suitable as a unique id
- location: Node | Edge | DataflowDiagram | str¶
- location_str(dfd: DataflowDiagram) str[source]¶
- flowstrider.models.threat.location_str(location: Node | Edge | DataflowDiagram | str, dfd: DataflowDiagram)[source]¶
flowstrider.models.threat_management module¶
- class flowstrider.models.threat_management.ThreatManagementDatabase(per_threat_information: Dict[str, flowstrider.models.threat_management.ThreatManagementItem] = <factory>)[source]¶
Bases:
object- get(threat_: Threat, dfd: DataflowDiagram)[source]¶
- per_threat_information: Dict[str, ThreatManagementItem]¶
- update(threats_in: List[Threat], dfd: DataflowDiagram)[source]¶
- class flowstrider.models.threat_management.ThreatManagementItem(uid: str = '', management_state: flowstrider.models.threat_management.ThreatManagementState = <ThreatManagementState.Undecided: 1>, explanation: str = '')[source]¶
Bases:
object- management_state: ThreatManagementState = 1¶