diff --git a/filters/audits/syslog.md b/filters/audits/syslog.md new file mode 100644 index 000000000..a0c64dfcc --- /dev/null +++ b/filters/audits/syslog.md @@ -0,0 +1,40 @@ +# Generic Syslog normalization and rule review + +Use the SDK fieldName key so message extraction is retained. + +This draft targets UTMStack `v11`. It contains 1 filter changes +and 0 rule changes for this technology only. Review covered +1 filter configurations and 3 matching shipped rule files. +Unchanged rules are listed in the regression manifest; they are not duplicated in the diff. + +## Contract and validation + +- Compared exact standard names/types with go-sdk v1.1.31 and the supplied UTMStack dictionaries. +- Checked documented pipeline ordering, rename/move behavior, open vendor log fields, + event-side versus alert-side fields, and surviving fields used by affected rule predicates/history/grouping. +- Strict SDK configuration decoding and actual CEL compilation pass for this scope. +- 1 synthetic normalization cases pass, including SDK Event conversion and any + trigger predicate assertions recorded in the manifest. +- The scoped alerts module tests and `git diff --check` pass with the shared contract runner applied. + +The shared alert-contract PR supplies the reusable Go runner for the manifest in +`plugins/alerts/testdata/filter-contracts/syslog.json`. Apply that support before running `go test ./...` in `plugins/alerts`. + +The model starts from synthetic extraction results. It does not run complex grok, +JSON/KV/XML/CSV extraction, time conversion, dynamic plugins, historical OpenSearch +queries, or the closed EventProcessor. Raw vendor logs and resulting alerts must +still be checked in staging before rollout. No customer false-positive reduction +has been measured and no production rollout is included. + +The one-field message capture is validated as a copy and the configuration decodes strictly against the SDK. + +## References + +- [SDK schema](https://github.com/threatwinds/go-sdk/blob/v1.1.31/plugins/plugins.proto) +- [Filter steps](https://github.com/threatwinds/go-sdk/wiki/Filter-Steps-Reference) +- [Standard event schema](https://github.com/threatwinds/go-sdk/wiki/Standard-Event-Schema) +- [Rule implementation](https://github.com/threatwinds/go-sdk/wiki/Implementing-Rules) + +`afterEvents`, empty noncapturing grok names, supported numeric strings, and custom +`log.*` fields are accepted. Existing textual protocol casing and vendor action names +are preserved unless a concrete consumer mismatch requires correction. diff --git a/filters/syslog/syslog-generic.yml b/filters/syslog/syslog-generic.yml index 718d496dc..1b93efb42 100644 --- a/filters/syslog/syslog-generic.yml +++ b/filters/syslog/syslog-generic.yml @@ -6,6 +6,6 @@ pipeline: steps: - grok: patterns: - - field_name: log.message + - fieldName: log.message pattern: '(.*)' source: raw \ No newline at end of file diff --git a/plugins/alerts/testdata/filter-contracts/syslog.json b/plugins/alerts/testdata/filter-contracts/syslog.json new file mode 100644 index 000000000..8b6bc2bc7 --- /dev/null +++ b/plugins/alerts/testdata/filter-contracts/syslog.json @@ -0,0 +1,24 @@ +{ + "technology": "Generic Syslog", + "filters": [ + "filters/syslog/syslog-generic.yml" + ], + "rules": [ + "rules/syslog/cef/file_hash_mismatches.yml", + "rules/syslog/cef/syslog_source_impersonation.yml", + "rules/syslog/cef/user_agent_anomalies.yml" + ], + "fixtures": [ + { + "name": "syslog_message_capture", + "filter": "syslog/syslog-generic.yml", + "input": { + "raw": "unstructured test message" + }, + "expected": { + "log.message": "unstructured test message", + "raw": "unstructured test message" + } + } + ] +}