SIEGMA icon indicating copy to clipboard operation
SIEGMA copied to clipboard

Refactor codebase

Open wesley587 opened this issue 2 years ago • 3 comments

Overview

This pull request includes a refactoring of the codebase to enhance modularity and improve code readability. The changes aim to simplify the existing implementation, reduce code duplication, and adhere to established design principles.

Changes Made:

  • To simplify the conversion process, replace Sigmac (legacy) with Pysigma.
  • Add detailed documentation that provides a explanation for each process.
  • Instead of using Pipenv, we are using Poetry as our virtual environment generator.
  • Include custom exceptions to provide a better understanding of errors during the conversion process.
  • Improve the abstraction level of the backend creation process.
  • Create an output folder to store the rule output and log files.
  • Create FileTools.py and DirectoryTools.py modules to facilitate common tasks related to directories and files.
  • Create a Backend enum to represent all the available backend converters, eliminating the need for multiple if-else statements..

Benefits

  • Improved code readability: The refactoring clarifies the purpose of functions, variables, and classes, making the codebase easier to understand and maintain.
  • Enhanced modularity: By extracting reusable code into separate modules and classes, we promote code reusability, reduce duplication, and enable easier modifications in the future.

future work

Developing azure and splunk backend converter.

wesley587 avatar May 10 '23 02:05 wesley587

cc @0xtf @heyibrahimkhan

w0rk3r avatar May 12 '23 12:05 w0rk3r

Will review and get back on this.

heyibrahimkhan avatar May 12 '23 22:05 heyibrahimkhan

Meanwhile @wesley587 , could you please run a spell check on these commits? 😅

heyibrahimkhan avatar May 12 '23 22:05 heyibrahimkhan