-
Notifications
You must be signed in to change notification settings - Fork 43
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
Split rule type format to show explicit ingestion and evaluation #758
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this improvement
This makes it a little bit more explicit what parts of the rule configures what functionality. Hopefully making the rules less confusing.
This refactors the functionality from ingestors and evaluators, thus making the code easier to track and more testable. It also implements the protobuf changes.
This makes sure that our error messages print out the assertion that didn't match.
This actually is handy
decf1ad
to
2e9ef9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's only one nit that you can as well fix in an upcoming PR
@@ -17,8 +17,8 @@ def: | |||
enabled: | |||
type: boolean | |||
default: true | |||
# Defines the configuration for both ingesting and evaluating the rule. | |||
data_eval: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also fix the example of the rule_type in docs/docs/manage_policies.md
? I wonder if the doc should instead just have an URL that points to an in-tree example rather than an embedded one to decrease the maintenance load.
This can be done in a separate PR, just should be done to avoid people being irritated by outdated docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder! I'll do that in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is #767
Now that #758 merged, we need to update the docs to reflect the new rule type syntax.
This makes it a little bit more explicit what parts of the rule configures what functionality. Hopefully, making the rules less confusing.
Now that we've separated the rule as we have, I've also separated the code which also makes it easier to test!