diff --git a/src/primaite/game/agent/actions.py b/src/primaite/game/agent/actions.py index 661be8b6..9e967f91 100644 --- a/src/primaite/game/agent/actions.py +++ b/src/primaite/game/agent/actions.py @@ -997,7 +997,8 @@ class ActionManager: {0: ("NODE_SERVICE_SCAN", {node_id:0, service_id:2})} """ if act_map is None: - raise RuntimeError("Action map must be specified in the config file.") + # raise RuntimeError("Action map must be specified in the config file.") + pass else: self.action_map = {i: (a["action"], a["options"]) for i, a in act_map.items()} # make sure all numbers between 0 and N are represented as dict keys in action map diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index 9d7b34cb..aa05fb0d 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -47,6 +47,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 9a0d5313..3580fd87 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -47,6 +47,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_2 diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index 95e09e16..4550edc5 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -72,6 +72,15 @@ agents: action_list: - type: DONOTHING - type: NODE_APPLICATION_EXECUTE + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index a5c3cd1c..a6f6bcfe 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -31,7 +31,10 @@ agents: action_space: action_list: - type: DONOTHING - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -67,6 +70,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index bcd86781..666e68c8 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -38,7 +38,10 @@ agents: action_space: action_list: - type: DONOTHING - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -74,6 +77,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index 70b33caa..0837facd 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -38,7 +38,10 @@ agents: # options: # execution_definition: # target_address: arcd.com - + action_map: + 0: + action: DONOTHING + options: {} options: nodes: - node_name: client_2 @@ -66,7 +69,6 @@ agents: type: UC2RedObservation options: nodes: {} - action_space: action_list: - type: DONOTHING @@ -74,6 +76,15 @@ agents: - type: NODE_FILE_DELETE - type: NODE_FILE_CORRUPT - type: NODE_OS_SCAN + action_map: + 0: + action: DONOTHING + options: {} + 1: + action: NODE_APPLICATION_EXECUTE + options: + node_id: 0 + application_id: 0 options: nodes: - node_name: client_1