You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/rsigma-eval/README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,7 +258,7 @@ Each transformation item in a pipeline can have:
258
258
259
259
| Type | Fields | Description |
260
260
|------|--------|-------------|
261
-
|`field_name_mapping`|`mapping: {k: v}`| Rename fields via a mapping dict |
261
+
|`field_name_mapping`|`mapping: {k: v \| [v1, v2, ...]}`| Rename fields via a mapping dict; list values expand the matched detection item into an OR over the alternatives (one-to-many, pySigma-compatible)|
262
262
|`field_name_prefix_mapping`|`mapping: {prefix: replacement}`| Rename fields matching a prefix |
263
263
|`field_name_prefix`|`prefix`| Add a prefix to all field names |
264
264
|`field_name_suffix`|`suffix`| Add a suffix to all field names |
@@ -437,6 +437,29 @@ let event = JsonEvent::borrow(&json!({"process.command_line": "whoami"}));
437
437
let matches = engine.evaluate(&event);
438
438
```
439
439
440
+
`field_name_mapping`also accepts a list of alternatives, matching pySigma's
441
+
`FieldMappingTransformation`. The matched detection item is expanded into an
442
+
OR over the alternatives — when the surrounding `AllOf` selection has other
443
+
items, they're preserved across each branch via a Cartesian expansion so the
444
+
`AND` / `OR` semantics stay correct:
445
+
446
+
```yaml
447
+
name: Hashes mapping
448
+
transformations:
449
+
- type: field_name_mapping
450
+
mapping:
451
+
Hashes:
452
+
- file.hash.md5
453
+
- file.hash.sha1
454
+
- file.hash.sha256
455
+
```
456
+
457
+
After applying this pipeline, a rule selecting `Hashes: 'abc123'` matches an
458
+
event populating *any* of `file.hash.md5`, `file.hash.sha1`, or
0 commit comments