Split sage.py into separate files
jzelenjak opened this issue · 0 comments
jzelenjak commented
Description
Currently, SAGE is one file sage.py
, which is over 1k lines of code. The largest part of the file consists of the functions, and only at the very end there is the actual main part. A better approach might be to split sage.py
into separate files, as it was also done in SECLEDS.
Proposed solution
- The following files will be present in the repository:
sage.py
with the main part, alert parsing and global parametersplotting.py
with the functions that are related to plotting (includingmake_state_groups
)episode_sequence_generation.py
(from making hyperalert sequences to trace generation, i.e. fromaggregate_into_episodes
untilgenerate_traces
excluding)model_learning.py
(fromgenerate_traces
untilmake_state_sequences
andgroup_episodes_per_av
including; the code ingroup_episodes_per_av
can go tomake_state_sequences
function, since it just makes the state sequences on an attacker or victim level)ag_generation.py
(converting state sequences into AGs, i.e.make_attack_graphs
and the related functions)
- Furthermore, the global parameters will become function parameters wherever applicable.
- Finally, the
docker
branch will be updated accordingly to make sure that all the files are copied.