Enable Creation of Individual Files for Translated Rules #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone,
this PR adds two new optional parameters to the sigma-cli command
sigma convert
and would close #58--output-dir
(-od
)--nesting-level
(-nl
)With
output_dir
it is possible to specify a directory in which all rules from the input are stored. The difference to the existing--output
is that not all rules are written in a single file, instead within theoutput_dir
there will be one file created for each translated rule.The
nesting-level
parameter defaults to 1. With this value, when one callssigma convert rules/*
with the following file hierarchy, the output_directory will contain all files on the same level. With anesting_level
of 2, the original structure with the parent directorieswindows
andlinux
would be transferred to the output_directory.I hope the names and descriptions of the two operators are clear. I also added two test cases. In my opinion this can be helpful for some people. Please let me know what you think and feel free to make changes.