-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- one test is still broken, needs further investigation why
- Loading branch information
Showing
14 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
tests/testdata/auto_tests/clusterer/rules/generic/rule_with_custom_tests.yml
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
filter: message | ||
clusterer: | ||
id: clusterer-rule-2 | ||
source_fields: [message] | ||
pattern: '(bytes|Bytes|Byte)' | ||
repl: 'byte' | ||
description: '...' | ||
tests: | ||
raw: 'Byte is a Bytes is a bytes is a byte' | ||
result: 'byte is a byte is a byte is a byte' | ||
result: 'byte is a byte is a byte is a byte' |
3 changes: 2 additions & 1 deletion
3
tests/testdata/auto_tests/clusterer/rules/specific/rule_with_custom_tests.yml
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
filter: message | ||
clusterer: | ||
id: clusterer-rule-1 | ||
source_fields: [message] | ||
pattern: '(bytes|Bytes|Byte)' | ||
repl: 'byte' | ||
description: '...' | ||
tests: | ||
raw: 'Byte is a Bytes is a bytes is a byte' | ||
result: 'byte is a byte is a byte is a byte' | ||
result: 'byte is a byte is a byte is a byte' |
3 changes: 2 additions & 1 deletion
3
tests/testdata/auto_tests/dissector/rules/specific/auto_test_mismatch.json
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[{ | ||
"filter": "message", | ||
"dissector": { | ||
"id": "dissector-1", | ||
"mapping": { | ||
"message": "%{source}-%{target}" | ||
} | ||
}, | ||
"description": "Test-rule with matching auto-test" | ||
}] | ||
}] |
3 changes: 2 additions & 1 deletion
3
tests/testdata/auto_tests/dissector/rules/specific/auto_test_no_test_.json
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[{ | ||
"filter": "message", | ||
"dissector": { | ||
"id": "dissector-2", | ||
"mapping": { | ||
"message": "%{source} %{target}" | ||
} | ||
}, | ||
"description": "Test-rule with matching auto-test" | ||
}] | ||
}] |
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 |
---|---|---|
|
@@ -2,9 +2,10 @@ | |
{ | ||
"filter": "drop_me", | ||
"dropper": { | ||
"id": "dropper-1", | ||
"drop": [ | ||
"drop_me" | ||
] | ||
} | ||
} | ||
] | ||
] |
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 |
---|---|---|
|
@@ -2,9 +2,10 @@ | |
{ | ||
"filter": "drop_me", | ||
"dropper": { | ||
"id": "dropper-2", | ||
"drop": [ | ||
"drop_me" | ||
] | ||
} | ||
} | ||
] | ||
] |
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
4 changes: 2 additions & 2 deletions
4
tests/testdata/auto_tests/pre_detector/rules/specific/auto_test_pre_detector_mismatch.json
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[{ | ||
"filter": "some_field", | ||
"pre_detector": { | ||
"id": "SOME_TEST_RULE_ID", | ||
"id": "SOME_TEST_RULE_ID_1", | ||
"title": "SOME_TEST_RULE", | ||
"severity": "critical", | ||
"mitre": [], | ||
"case_condition": "directly" | ||
}, | ||
"sigma_fields": true, | ||
"description": "Test-rule with mismatching auto-test" | ||
}] | ||
}] |
4 changes: 2 additions & 2 deletions
4
tests/testdata/auto_tests/pre_detector/rules/specific/auto_test_pre_detector_no_test_.json
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[{ | ||
"filter": "some_field", | ||
"pre_detector": { | ||
"id": "SOME_TEST_RULE_ID", | ||
"id": "SOME_TEST_RULE_ID_2", | ||
"title": "SOME_TEST_RULE", | ||
"severity": "critical", | ||
"mitre": [], | ||
"case_condition": "directly" | ||
}, | ||
"sigma_fields": true, | ||
"description": "Test-rule without auto-test" | ||
}] | ||
}] |
6 changes: 4 additions & 2 deletions
6
tests/testdata/auto_tests/template_replacer/rules/generic/template_replacer.json
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
[{ | ||
"filter": "winlog.provider_name: \"the provider\" AND winlog.event_id: 123", | ||
"template_replacer": {}, | ||
"template_replacer": { | ||
"id": "template-replacer-1" | ||
}, | ||
"description": "" | ||
}] | ||
}] |
6 changes: 4 additions & 2 deletions
6
tests/testdata/auto_tests/template_replacer/rules/specific/template_replacer.json
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
[ | ||
{ | ||
"filter": "winlog.provider_name: \"the provider\" AND winlog.event_id: 123", | ||
"template_replacer": {}, | ||
"template_replacer": { | ||
"id": "template-replacer-2" | ||
}, | ||
"description": "" | ||
} | ||
] | ||
] |
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