Repository navigation
Home
hjalmarhoglund edited this page Aug 26, 2026
·
9 revisions
The MAL Simulator is a tool designed for running simulations on systems modeled in the Meta Attack Language (MAL).
pip install mal-simulator
To also get ML dependencies (pettingzoo, gymnasium):
pip install mal-simulator[ml]
For additional dev tools:
pip install mal-simulator[dev]
- Use Conventional commits
- The CI pipeline runs
mypyandrufffor linting and type checking, and PRs will only be merged if pipeline succeeds.
A mal_simulator.MalSimulator can be created to be able to run simulations.
The MalSimulator can be given a settings (mal_simulator.MalSimulatorSettings)
through the parameter 'sim_settings'. Giving sim_settings is optional, otherwise default settings are used.
settings = MalSimulatorSettings(
# Default values
uncompromise_untraversable_steps: bool = False
ttc_mode: TTCMode = TTCMode.DISABLED
seed: Optional[int] = None
attack_surface = AttackSurfaceSettings(
skip_compromised: bool = True
skip_unnecessary: bool = False
)
run_defense_step_bernoullis: bool = True
attacker_reward_mode: RewardMode = RewardMode.CUMULATIVE
defender_reward_mode: RewardMode = RewardMode.CUMULATIVE
)
sim = MalSimulator(attack_graph, sim_settings=settings, ...)