File tree 1 file changed +4
-5
lines changed
maltoolbox/attackgraph/analyzers
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,16 @@ def propagate_necessity_from_node(node: AttackGraphNode) -> None:
55
55
node .full_name , node .id , node .is_necessary
56
56
)
57
57
58
- if node .ttc and 'name' in node .ttc :
59
- if node .ttc ['name' ] not in ['Enabled' , 'Disabled' , 'Instant' ]:
58
+ for child in node .children :
59
+ if child .ttc and child .ttc .get ('name' , None ) not in ['Enabled' ,
60
+ 'Disabled' , 'Instant' ]:
60
61
# Do not propagate unnecessary state from nodes that have a TTC
61
62
# probability distribution associated with them.
62
63
# TODO: Evaluate this more carefully, how do we want to have TTCs
63
64
# impact necessity and viability.
64
65
# TODO: Have this condition be any probability that has a
65
66
# Bernoulli component
66
- return
67
-
68
- for child in node .children :
67
+ continue
69
68
original_value = child .is_necessary
70
69
if child .type == 'or' :
71
70
child .is_necessary = False
You can’t perform that action at this time.
0 commit comments