mal-toolbox 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mal_toolbox-0.3.1/mal_toolbox.egg-info → mal_toolbox-0.3.2}/PKG-INFO +1 -1
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2/mal_toolbox.egg-info}/PKG-INFO +1 -1
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/__init__.py +2 -2
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/analyzers/apriori.py +11 -3
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/pyproject.toml +1 -1
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/AUTHORS +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/LICENSE +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/README.md +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/mal_toolbox.egg-info/SOURCES.txt +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/mal_toolbox.egg-info/dependency_links.txt +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/mal_toolbox.egg-info/entry_points.txt +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/mal_toolbox.egg-info/requires.txt +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/mal_toolbox.egg-info/top_level.txt +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/__main__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/analyzers/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/attacker.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/attackgraph.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/node.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/attackgraph/query.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/exceptions.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/file_utils.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/ingestors/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/ingestors/neo4j.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/language/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/language/compiler/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/language/compiler/mal_lexer.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/language/compiler/mal_parser.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/language/languagegraph.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/model.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/translators/__init__.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/translators/securicad.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/maltoolbox/translators/updater.py +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/setup.cfg +0 -0
- {mal_toolbox-0.3.1 → mal_toolbox-0.3.2}/tests/test_model.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-toolbox
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A collection of tools used to create MAL models and attack graphs.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Giuseppe Nebbione <nebbione@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-toolbox
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A collection of tools used to create MAL models and attack graphs.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Giuseppe Nebbione <nebbione@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# MAL Toolbox v0.3.
|
|
2
|
+
# MAL Toolbox v0.3.2
|
|
3
3
|
# Copyright 2024, Andrei Buhaiu.
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -21,7 +21,7 @@ MAL-Toolbox Framework
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
__title__ = "maltoolbox"
|
|
24
|
-
__version__ = "0.3.
|
|
24
|
+
__version__ = "0.3.2"
|
|
25
25
|
__authors__ = [
|
|
26
26
|
"Andrei Buhaiu",
|
|
27
27
|
"Giuseppe Nebbione",
|
|
@@ -178,11 +178,19 @@ def prune_unviable_and_unnecessary_nodes(graph: AttackGraph) -> None:
|
|
|
178
178
|
graph - the attack graph for which we wish to remove the
|
|
179
179
|
the nodes which are not viable or necessary.
|
|
180
180
|
"""
|
|
181
|
-
logger.debug(
|
|
181
|
+
logger.debug(
|
|
182
|
+
'Prune unviable and unnecessary nodes from the attack graph.')
|
|
183
|
+
|
|
184
|
+
nodes_to_remove = set()
|
|
182
185
|
for node in graph.nodes.values():
|
|
183
|
-
if
|
|
186
|
+
if node.type in ('or', 'and') and \
|
|
184
187
|
(not node.is_viable or not node.is_necessary):
|
|
185
|
-
|
|
188
|
+
nodes_to_remove.add(node)
|
|
189
|
+
|
|
190
|
+
# Do the removal separatly so we don't remove
|
|
191
|
+
# nodes from a set we are looping over
|
|
192
|
+
for node in nodes_to_remove:
|
|
193
|
+
graph.remove_node(node)
|
|
186
194
|
|
|
187
195
|
|
|
188
196
|
def propagate_viability_from_unviable_node(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|