mal-toolbox 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
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-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/METADATA +18 -5
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/RECORD +10 -10
- maltoolbox/__init__.py +2 -2
- maltoolbox/attackgraph/attackgraph.py +1 -1
- maltoolbox/language/languagegraph.py +7 -10
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/WHEEL +0 -0
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/entry_points.txt +0 -0
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/licenses/AUTHORS +0 -0
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {mal_toolbox-1.0.1.dist-info → mal_toolbox-1.0.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mal-toolbox
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.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
|
|
@@ -86,13 +86,26 @@ pip install mal-toolbox
|
|
|
86
86
|
|
|
87
87
|
## Configuration
|
|
88
88
|
You can use a `maltoolbox.yml` file in the current working directory to
|
|
89
|
-
configure the toolbox.
|
|
90
|
-
|
|
89
|
+
configure the toolbox.
|
|
90
|
+
|
|
91
|
+
The config should look like this:
|
|
92
|
+
```yml
|
|
93
|
+
logging:
|
|
94
|
+
log_level: INFO
|
|
95
|
+
log_file: "logs/log.txt"
|
|
96
|
+
attackgraph_file: "logs/attackgraph.json"
|
|
97
|
+
model_file: "logs/model.yml"
|
|
98
|
+
langspec_file: "logs/langspec_file.yml"
|
|
99
|
+
langgraph_file: "logs/langspec_file.yml"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Alternatively, you can use the `MALTOOLBOX_CONFIG`
|
|
103
|
+
environment variable to set a custom config file location.
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
```bash
|
|
93
106
|
# in your shell, e.g. bash do:
|
|
94
107
|
export MALTOOLBOX_CONFIG=path/to/yml/config/file
|
|
95
|
-
|
|
108
|
+
```
|
|
96
109
|
|
|
97
110
|
The default configuration can be found here:
|
|
98
111
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
mal_toolbox-1.0.
|
|
2
|
-
mal_toolbox-1.0.
|
|
3
|
-
maltoolbox/__init__.py,sha256=
|
|
1
|
+
mal_toolbox-1.0.2.dist-info/licenses/AUTHORS,sha256=zxLrLe8EY39WtRKlAY4Oorx4Z2_LHV2ApRvDGZgY7xY,127
|
|
2
|
+
mal_toolbox-1.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
3
|
+
maltoolbox/__init__.py,sha256=6ptmrCtF7ag3EJSnZIuo-oRccQwL7Yvz3Cs_B0WEpnE,2043
|
|
4
4
|
maltoolbox/__main__.py,sha256=QBloKCJ_RMsFPZ8qiWZQnoP2gnnRyECIJBfA1zTAYJM,2394
|
|
5
5
|
maltoolbox/exceptions.py,sha256=0YjPx2v1yYumZ2o7pVZ1s_jS-GAb3Ng979KEFhROSNY,1399
|
|
6
6
|
maltoolbox/file_utils.py,sha256=fYG3UsvPQcU0ES_WI3nLfuzSZgc0jtE4IAxdMGgs9aA,1876
|
|
7
7
|
maltoolbox/model.py,sha256=xTK2jUr0Gz5pPVhdjh78zO5G46nV8N2ciIt6M5SwcGU,16058
|
|
8
8
|
maltoolbox/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
maltoolbox/attackgraph/__init__.py,sha256=m_81AjzwXONdclcW_R7mF2f8p-4DvoSRVfQ3Nyh7fak,298
|
|
10
|
-
maltoolbox/attackgraph/attackgraph.py,sha256=
|
|
10
|
+
maltoolbox/attackgraph/attackgraph.py,sha256=qPuZjycEtMZKAoqdGC9Ume0ehy0SBWagLbLkr-9T1hQ,26871
|
|
11
11
|
maltoolbox/attackgraph/node.py,sha256=Z2sdzXhPel9h7ySxP9fjgd1exVmpRbvRySVtLpI1_BM,3904
|
|
12
12
|
maltoolbox/attackgraph/analyzers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
maltoolbox/ingestors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
maltoolbox/language/__init__.py,sha256=TsTTryEyjChwHN1o5F2BSUlFsAss2N6J0H0-nzvXiD8,489
|
|
15
|
-
maltoolbox/language/languagegraph.py,sha256=
|
|
15
|
+
maltoolbox/language/languagegraph.py,sha256=pMi9kdpg_UOWpKNnk-UG56zeX49Q4TBdqY6YPgII9mY,73713
|
|
16
16
|
maltoolbox/language/compiler/__init__.py,sha256=JQyAgDwJh1pU7AmuOhd1-d2b2PYXpgMVPtxnav8QHVc,15872
|
|
17
17
|
maltoolbox/language/compiler/mal_lexer.py,sha256=BeifykDAt4PloRASOaLzBgWF35ev_zgD8lXMIsSHykc,12063
|
|
18
18
|
maltoolbox/language/compiler/mal_parser.py,sha256=sUoaE43l2VKg-Dou30mk2wlVS1FvdOREwHNIyFe4IkY,114699
|
|
19
19
|
maltoolbox/translators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
maltoolbox/translators/securicad.py,sha256=F_rndv2JyKxfHAXPwf2RrdiFPnemJVArYUpVsFP6QQk,6997
|
|
21
21
|
maltoolbox/translators/updater.py,sha256=UZPnx22udROiocCcSmtrgUJUupkjktkxl-M7rhBxUPc,8660
|
|
22
|
-
mal_toolbox-1.0.
|
|
23
|
-
mal_toolbox-1.0.
|
|
24
|
-
mal_toolbox-1.0.
|
|
25
|
-
mal_toolbox-1.0.
|
|
26
|
-
mal_toolbox-1.0.
|
|
22
|
+
mal_toolbox-1.0.2.dist-info/METADATA,sha256=l0IFnHUBb1MyIVt2Xq939KFA5jdzLQWdBISYVwqddO4,5358
|
|
23
|
+
mal_toolbox-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
mal_toolbox-1.0.2.dist-info/entry_points.txt,sha256=oqby5O6cUP_OHCm70k_iYPA6UlbTBf7se1i3XwdK3uU,56
|
|
25
|
+
mal_toolbox-1.0.2.dist-info/top_level.txt,sha256=phqRVLRKGdSUgRY03mcpi2cmbbDo5YGjkV4gkqHFFcM,11
|
|
26
|
+
mal_toolbox-1.0.2.dist-info/RECORD,,
|
maltoolbox/__init__.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# MAL Toolbox v1.0.
|
|
2
|
+
# MAL Toolbox v1.0.2
|
|
3
3
|
# Copyright 2025, 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__ = "1.0.
|
|
24
|
+
__version__ = "1.0.2"
|
|
25
25
|
__authors__ = [
|
|
26
26
|
"Andrei Buhaiu",
|
|
27
27
|
"Giuseppe Nebbione",
|
|
@@ -194,7 +194,7 @@ class AttackGraph():
|
|
|
194
194
|
ttc_dist = node_dict['ttc'],
|
|
195
195
|
existence_status = node_dict.get('existence_status', None)
|
|
196
196
|
)
|
|
197
|
-
ag_node.tags =
|
|
197
|
+
ag_node.tags = list(node_dict.get('tags', []))
|
|
198
198
|
ag_node.extras = node_dict.get('extras', {})
|
|
199
199
|
|
|
200
200
|
if node_asset:
|
|
@@ -490,7 +490,7 @@ class LanguageGraphAttackStep:
|
|
|
490
490
|
info: dict = field(default_factory = dict)
|
|
491
491
|
inherits: Optional[LanguageGraphAttackStep] = None
|
|
492
492
|
own_requires: list[ExpressionsChain] = field(default_factory=list)
|
|
493
|
-
tags:
|
|
493
|
+
tags: list = field(default_factory = list)
|
|
494
494
|
detectors: dict = field(default_factory = lambda: {})
|
|
495
495
|
|
|
496
496
|
|
|
@@ -968,7 +968,7 @@ class LanguageGraph():
|
|
|
968
968
|
children = {},
|
|
969
969
|
parents = {},
|
|
970
970
|
info = attack_step_dict['info'],
|
|
971
|
-
tags =
|
|
971
|
+
tags = list(attack_step_dict['tags'])
|
|
972
972
|
)
|
|
973
973
|
asset.attack_steps[attack_step_dict['name']] = \
|
|
974
974
|
attack_step_node
|
|
@@ -1692,7 +1692,7 @@ class LanguageGraph():
|
|
|
1692
1692
|
children = {},
|
|
1693
1693
|
parents = {},
|
|
1694
1694
|
info = attack_step_attribs['meta'],
|
|
1695
|
-
tags =
|
|
1695
|
+
tags = list(attack_step_attribs['tags'])
|
|
1696
1696
|
)
|
|
1697
1697
|
langspec_dict[attack_step_node.full_name] = \
|
|
1698
1698
|
attack_step_attribs
|
|
@@ -1735,7 +1735,7 @@ class LanguageGraph():
|
|
|
1735
1735
|
children = {},
|
|
1736
1736
|
parents = {},
|
|
1737
1737
|
info = attack_step.info,
|
|
1738
|
-
tags =
|
|
1738
|
+
tags = list(attack_step.tags)
|
|
1739
1739
|
)
|
|
1740
1740
|
attack_step_node.inherits = attack_step
|
|
1741
1741
|
asset.attack_steps[attack_step.name] = attack_step_node
|
|
@@ -1743,12 +1743,9 @@ class LanguageGraph():
|
|
|
1743
1743
|
# The inherited attack step was already overridden.
|
|
1744
1744
|
continue
|
|
1745
1745
|
else:
|
|
1746
|
-
asset.attack_steps[attack_step.name].inherits =
|
|
1747
|
-
|
|
1748
|
-
asset.attack_steps[attack_step.name].
|
|
1749
|
-
attack_step.tags
|
|
1750
|
-
asset.attack_steps[attack_step.name].info |= \
|
|
1751
|
-
attack_step.info
|
|
1746
|
+
asset.attack_steps[attack_step.name].inherits = attack_step
|
|
1747
|
+
asset.attack_steps[attack_step.name].tags += attack_step.tags
|
|
1748
|
+
asset.attack_steps[attack_step.name].info |= attack_step.info
|
|
1752
1749
|
|
|
1753
1750
|
# Then, link all of the attack step nodes according to their
|
|
1754
1751
|
# associations.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|