From 8a5381d63e5928b41afb51eab7e4c23f3bc981ee Mon Sep 17 00:00:00 2001 From: William Blum Date: Mon, 28 Apr 2025 05:23:20 +0000 Subject: [PATCH] Fix firewall initialization in NodeInfo to use default factory --- cyberbattle/simulation/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberbattle/simulation/model.py b/cyberbattle/simulation/model.py index 2753c02..5393c0a 100644 --- a/cyberbattle/simulation/model.py +++ b/cyberbattle/simulation/model.py @@ -326,7 +326,7 @@ class NodeInfo: # Properties of the nodes, some of which can imply further vulnerabilities properties: List[PropertyName] = dataclasses.field(default_factory=list) # Fireall configuration of the node - firewall: FirewallConfiguration = FirewallConfiguration() + firewall: FirewallConfiguration = dataclasses.field(default_factory=FirewallConfiguration) # Attacker agent installed on the node? (aka the node is 'pwned') agent_installed: bool = False # Esclation level