mal-toolbox 0.1.12__tar.gz → 0.2.0__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.
Files changed (41) hide show
  1. {mal_toolbox-0.1.12/mal_toolbox.egg-info → mal_toolbox-0.2.0}/PKG-INFO +1 -1
  2. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0/mal_toolbox.egg-info}/PKG-INFO +1 -1
  3. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/__init__.py +2 -2
  4. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/analyzers/apriori.py +4 -1
  5. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/attackgraph.py +294 -245
  6. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/node.py +23 -7
  7. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/file_utils.py +6 -2
  8. mal_toolbox-0.2.0/maltoolbox/language/__init__.py +8 -0
  9. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/language/classes_factory.py +86 -70
  10. mal_toolbox-0.2.0/maltoolbox/language/languagegraph.py +1731 -0
  11. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/model.py +44 -35
  12. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/pyproject.toml +1 -1
  13. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/tests/test_model.py +53 -45
  14. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/tests/test_wrappers.py +1 -1
  15. mal_toolbox-0.1.12/maltoolbox/language/__init__.py +0 -4
  16. mal_toolbox-0.1.12/maltoolbox/language/languagegraph.py +0 -1184
  17. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/AUTHORS +0 -0
  18. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/LICENSE +0 -0
  19. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/README.md +0 -0
  20. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/mal_toolbox.egg-info/SOURCES.txt +0 -0
  21. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/mal_toolbox.egg-info/dependency_links.txt +0 -0
  22. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/mal_toolbox.egg-info/requires.txt +0 -0
  23. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/mal_toolbox.egg-info/top_level.txt +0 -0
  24. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/__main__.py +0 -0
  25. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/__init__.py +0 -0
  26. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/analyzers/__init__.py +0 -0
  27. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/attacker.py +0 -0
  28. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/attackgraph/query.py +0 -0
  29. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/default.conf +0 -0
  30. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/exceptions.py +0 -0
  31. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/ingestors/__init__.py +0 -0
  32. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/ingestors/neo4j.py +0 -0
  33. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/language/compiler/__init__.py +0 -0
  34. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/language/compiler/mal_lexer.py +0 -0
  35. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/language/compiler/mal_parser.py +0 -0
  36. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/language/compiler/mal_visitor.py +0 -0
  37. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/translators/__init__.py +0 -0
  38. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/translators/securicad.py +0 -0
  39. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/translators/updater.py +0 -0
  40. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/maltoolbox/wrappers.py +0 -0
  41. {mal_toolbox-0.1.12 → mal_toolbox-0.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mal-toolbox
3
- Version: 0.1.12
3
+ Version: 0.2.0
4
4
  Summary: A collection of tools used to create MAL models and attack graphs.
5
5
  Author-email: Andrei Buhaiu <buhaiu@kth.se>, Giuseppe Nebbione <nebbione@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Joakim Loxdal <loxdal@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.1.12
3
+ Version: 0.2.0
4
4
  Summary: A collection of tools used to create MAL models and attack graphs.
5
5
  Author-email: Andrei Buhaiu <buhaiu@kth.se>, Giuseppe Nebbione <nebbione@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Joakim Loxdal <loxdal@kth.se>
6
6
  License: Apache Software License
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # MAL Toolbox v0.1.12
2
+ # MAL Toolbox v0.2.0
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.1.12'
24
+ __version__ = '0.2.0'
25
25
  __authors__ = ['Andrei Buhaiu',
26
26
  'Giuseppe Nebbione',
27
27
  'Nikolaos Kakouros',
@@ -55,11 +55,13 @@ def propagate_necessity_from_node(node: AttackGraphNode) -> None:
55
55
  )
56
56
 
57
57
  if node.ttc and 'name' in node.ttc:
58
- if node.ttc['name'] not in ['Enabled', 'Disabled']:
58
+ if node.ttc['name'] not in ['Enabled', 'Disabled', 'Instant']:
59
59
  # Do not propagate unnecessary state from nodes that have a TTC
60
60
  # probability distribution associated with them.
61
61
  # TODO: Evaluate this more carefully, how do we want to have TTCs
62
62
  # impact necessity and viability.
63
+ # TODO: Have this condition be any probability that has a
64
+ # Bernoulli component
63
65
  return
64
66
 
65
67
  for child in node.children:
@@ -175,6 +177,7 @@ def prune_unviable_and_unnecessary_nodes(graph: AttackGraph) -> None:
175
177
  graph - the attack graph for which we wish to remove the
176
178
  the nodes which are not viable or necessary.
177
179
  """
180
+ logger.debug('Prune unviable and unnecessary nodes from the attack graph.')
178
181
  for node in graph.nodes:
179
182
  if (node.type == 'or' or node.type == 'and') and \
180
183
  (not node.is_viable or not node.is_necessary):