-
Notifications
You must be signed in to change notification settings - Fork 687
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
Comprehensive testing for OSSEC rules #2134
Comments
Relevant for the testing story here is that OSSEC 2.9 added support for JSON logging. We'll need to evaluate whether it's worth changing the output format given that we also pipe the events to Before we upgrade OSSEC we should tackle #1756. I also don't think we have a discrete issue for bumping the OSSEC version, so I'll add that presently. |
Writing automated tests for |
Description
We should have automated testing to ensure that particular log events do or do not produce OSSEC alerts. We can begin by adding regression tests when patching the OSSEC rules.
It appears that the right tool for testing if particular log events do or do not produce OSSEC alerts is
ossec-logtest
. This is currently installed onmon
. For example, if I want to test whether the log event described in PR #871 produces an alert, I can simply pass the event toossec-logtest
, it will read the rules that are currently configured, and inform me whether or not an OSSEC rule would be produced, and if so, what the alert level would be:We can use this
ossec-logtest
utility to create newtestinfra
tests for our OSSEC rules.Eventually, we could also incorporate testing for OSSEC into our integration testing: when user interaction occurs, we should verify that OSSEC alerts are not produced. This would catch bugs like #1331 and #1240.
The text was updated successfully, but these errors were encountered: