Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor codebase #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

wesley587
Copy link

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.

@w0rk3r
Copy link
Contributor

w0rk3r commented May 12, 2023

cc @0xtf @heyibrahimkhan

@heyibrahimkhan heyibrahimkhan self-assigned this May 12, 2023
@heyibrahimkhan heyibrahimkhan added documentation Improvements or additions to documentation enhancement New feature or request labels May 12, 2023
@heyibrahimkhan heyibrahimkhan linked an issue May 12, 2023 that may be closed by this pull request
@heyibrahimkhan
Copy link
Contributor

Will review and get back on this.

@heyibrahimkhan
Copy link
Contributor

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

Copy link
Contributor

@w0rk3r w0rk3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments around grammar

Exceptions.py Outdated Show resolved Hide resolved
Exceptions.py Outdated Show resolved Hide resolved
Exceptions.py Outdated Show resolved Hide resolved
Exceptions.py Outdated Show resolved Hide resolved
LICENCE Outdated Show resolved Hide resolved
tools/SigmaUtils.py Outdated Show resolved Hide resolved
tools/SigmaUtils.py Outdated Show resolved Hide resolved
tools/SigmaUtils.py Outdated Show resolved Hide resolved
tools/SigmaUtils.py Outdated Show resolved Hide resolved
tools/SigmaUtils.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pySigma support?
3 participants