-
Notifications
You must be signed in to change notification settings - Fork 913
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit tests for skipping unknown filter
New unit test for skipping unknown filter. Test cases: - A rule that refers to an unknown filter results in an error. - A rule that refers to an unknown filter, but has "skip-if-unknown-filter: true", can be read, but doesn't match any events. - A rule that refers to an unknown filter, but has "skip-if-unknown-filter: false", returns an error. Also test the case of a filtercheck like evt.arg.xxx working properly with the embedded patterns as well as proc.aname/apid which work both ways.
- Loading branch information
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- rule: Contains Unknown Event And Not Skipping | ||
desc: Contains an unknown event | ||
condition: proc.nobody=cat | ||
output: Never | ||
skip-if-unknown-filter: false | ||
priority: INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- rule: Contains Unknown Event And Skipping | ||
desc: Contains an unknown event | ||
condition: evt.type=open and proc.nobody=cat | ||
output: Never | ||
skip-if-unknown-filter: true | ||
priority: INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- rule: Contains Prefix of Filter | ||
desc: Testing matching filter prefixes | ||
condition: > | ||
evt.type=open and evt.arg.path="foo" and evt.arg[0]="foo" | ||
and proc.aname="ls" and proc.aname[1]="ls" | ||
and proc.apid=10 and proc.apid[1]=10 | ||
output: Never | ||
priority: INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- rule: Contains Unknown Event And Unspecified | ||
desc: Contains an unknown event | ||
condition: proc.nobody=cat | ||
output: Never | ||
priority: INFO |