-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
chore: give back list of promoted rules #5420
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
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for contributing. I am curious. Is there a specific reason for you to add this feature? We don't really use the output outside the build job like that. Maybe there is another enhancement we can make (build artefact, add it to the message in the PR, ...) |
Your welcome, @phantinuss. I am new to the project, and I was looking into the test directory. I thought it would make a better user experience. Sure, I'd be glad to work these tasks. I will push other PRs as this one is merged. The changes some be done in the promotion workflow; right? |
@phantinuss, here is the PR for review. I have added the building of artifacts in the promotion workflow. |
36ac9eb
to
18fc668
Compare
Refactor for an upcoming commit: - promote_rule renamed from promote_rules, its input is now a rule - is_experimental_and_older_than_ref extracted from get_rules_to_promote Co-authored-by: phantinuss <79651203+phantinuss@users.noreply.github.com> Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
tests/promote_rules_status.py gives back no output, > .venv/bin/python3 tests/promote_rules_status.py; echo $? 0 And does not tell which rules were promoted. Useful for an upcoming CI/CD commit. Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Build artifacts of promoted rules by installing a backend, and choosing any pipeline compatible with that backend. The selection is random: for each CI/CD run, a different pair of target/pipeline is tested. This will help to detect incompatibilities between backends, targets, or rules. GH issue: SigmaHQ#5422 Suggested-by: phantinuss <79651203+phantinuss@users.noreply.github.com> Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Summary of the Pull Request
tests/promote_rules_status.py
gives back no output,# .venv/bin/python3 tests/promote_rules_status.py; echo $? 0
And does not tell which rules when promoted. Now, the rules are given back.
Moreover, the building of artifacts is added into the promotion workflow.
Changelog
chore: update tests/promote_rules_status.py to return the promoted rules
chore: .github/workflows/sigma-rule-promoter.yml to build artifacts of promoted rules
Example Log Event
Fixed Issues
SigmaHQ Rule Creation Conventions