Closed mrkickling closed 2 months ago
Looks good.
malsim.register_envs()
scenario_file = "/storage/GitHub/malsim-scenarios/scenarios/trainingLang/scenario-phishing-one-host/scenario.yml"
env = gym.make("MALDefenderEnv-v0",
scenario_file=scenario_file,
)
attack_graph, _ = load_scenario(scenario_file)
Found a potential bug. When I load the scenario with the wrapper, the attack graph has six nodes, but then I load the same scenario with the load_scenario function it has seven.
malsim.register_envs() scenario_file = "/storage/GitHub/malsim-scenarios/scenarios/trainingLang/scenario-phishing-one-host/scenario.yml" env = gym.make("MALDefenderEnv-v0", scenario_file=scenario_file, ) attack_graph, _ = load_scenario(scenario_file)
Found a potential bug. When I load the scenario with the wrapper, the attack graph has six nodes, but then I load the same scenario with the load_scenario function it has seven.
That is because the MalSimulator initialization prunes the unnecessary and unviable nodes right now. The load_scenario method does not create the simulator just yet, which is why they are of different sizes.
Feels like a design decision, should the graph be pruned by default or not? See #40
Feels like a design decision, should the graph be pruned by default or not? See #40
I think it should be enabled by default because most people don't like seeing untraversable nodes and they might not dig enough to figure out that pruning is even an option.
Make use of scenario in GymWrappers, replaces the LazyWrapper.