Commit fe09815
Set device.os.type to Linux on all OCSF events (DataDog#23714)
* Set device.os.type to Linux on all OCSF events
Add a schema-category-mapper that sets ocsf.device.os.type and
ocsf.device.os.type_id (200/Linux) on every event the integration
emits. This gives downstream rules a stable, source-agnostic way to
filter for Linux events — e.g. cross-source detection rules can use
@ocsf.device.os.type:Linux to scope to Linux endpoints without
depending on metadata.product.vendor_name (which encodes the source,
not the OS).
Also add profiles: [host] to the SOCKADDR Network Activity
sub-pipeline so device.os.* validates against the OCSF schema there
(Network Activity has no native device attribute).
Test fixtures updated to expect device.os in all 29 ocsf: blocks, and
the SOCKADDR fixture to expect metadata.profiles: [host].
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Fix OCSF validation: device.os.name, base_event host profile, device.type_id
Address validator errors after adding device.os.type to all sub-pipelines:
- ocsf.device.os.name is required by the OCSF OS object; set it to
"Linux" via a top-level string-builder in the OCSF pre-transformations
sub-pipeline so it applies to every event.
- ocsf.device.name is required to satisfy the Device object's
at_least_one constraint on sub-pipelines that don't otherwise
populate hostname/ip; set to "Unknown" via the same top-level
string-builder.
- Base Event class natively includes the host profile in OCSF;
declaring profiles: [host] on the Base Event schema-processor
brings the pipeline in line so device.* validates.
- ocsf.device.type_id was missing from Base Event, SOCKADDR Network
Activity, and SYSCALL Network Activity sub-pipelines; added a
schema-category-mapper (Unknown / 0) to each.
Test fixtures updated to reflect the new fields: device.os.name on all
29 fixtures, device.name on the 11 fixtures that previously lacked it
(9 IAM/Device-Config with hostname/ip, 2 Network 4001), device.type
and device.type_id on the 11 fixtures that previously lacked the full
device shape (9 Base Event, 2 Network 4001), and metadata.profiles:
[host] on the 9 Base Event fixtures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 413f117 commit fe09815
2 files changed
Lines changed: 414 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
470 | 482 | | |
471 | 483 | | |
472 | 484 | | |
| |||
490 | 502 | | |
491 | 503 | | |
492 | 504 | | |
493 | | - | |
| 505 | + | |
| 506 | + | |
494 | 507 | | |
495 | 508 | | |
496 | 509 | | |
| |||
597 | 610 | | |
598 | 611 | | |
599 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
600 | 639 | | |
601 | 640 | | |
602 | 641 | | |
| |||
846 | 885 | | |
847 | 886 | | |
848 | 887 | | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
849 | 901 | | |
850 | 902 | | |
851 | 903 | | |
| |||
1120 | 1172 | | |
1121 | 1173 | | |
1122 | 1174 | | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
1123 | 1188 | | |
1124 | 1189 | | |
1125 | 1190 | | |
| |||
1355 | 1420 | | |
1356 | 1421 | | |
1357 | 1422 | | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1358 | 1436 | | |
1359 | 1437 | | |
1360 | 1438 | | |
| |||
1609 | 1687 | | |
1610 | 1688 | | |
1611 | 1689 | | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
1612 | 1703 | | |
1613 | 1704 | | |
1614 | 1705 | | |
| |||
1873 | 1964 | | |
1874 | 1965 | | |
1875 | 1966 | | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1876 | 1980 | | |
1877 | 1981 | | |
1878 | 1982 | | |
| |||
2167 | 2271 | | |
2168 | 2272 | | |
2169 | 2273 | | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
2170 | 2287 | | |
2171 | 2288 | | |
2172 | 2289 | | |
| |||
2416 | 2533 | | |
2417 | 2534 | | |
2418 | 2535 | | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
2419 | 2549 | | |
2420 | 2550 | | |
2421 | 2551 | | |
| |||
2639 | 2769 | | |
2640 | 2770 | | |
2641 | 2771 | | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
2642 | 2785 | | |
2643 | 2786 | | |
2644 | 2787 | | |
| |||
2827 | 2970 | | |
2828 | 2971 | | |
2829 | 2972 | | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
2830 | 2986 | | |
2831 | 2987 | | |
2832 | 2988 | | |
| |||
3061 | 3217 | | |
3062 | 3218 | | |
3063 | 3219 | | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
3064 | 3233 | | |
3065 | 3234 | | |
3066 | 3235 | | |
| |||
3088 | 3257 | | |
3089 | 3258 | | |
3090 | 3259 | | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
3091 | 3263 | | |
3092 | 3264 | | |
3093 | 3265 | | |
| |||
3187 | 3359 | | |
3188 | 3360 | | |
3189 | 3361 | | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
3190 | 3388 | | |
3191 | 3389 | | |
3192 | 3390 | | |
| |||
3403 | 3601 | | |
3404 | 3602 | | |
3405 | 3603 | | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
0 commit comments