Skip to content

Commit ca0cfc0

Browse files
[symantec_endpoint_security] Fix null check conditions (#11029)
A number of field references unsafely included access through potentially null objects, so add null-safe operators.
1 parent 5092b8e commit ca0cfc0

14 files changed

+5513
-18
lines changed

packages/symantec_endpoint_security/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.3.2"
3+
changes:
4+
- description: Handle null values scenario.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/11029
27
- version: "0.3.1"
38
changes:
49
- description: Improve handling of scalar `raw_data` field values.

packages/symantec_endpoint_security/data_stream/event/_dev/test/pipeline/test-category-diagnostic.log

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

packages/symantec_endpoint_security/data_stream/event/_dev/test/pipeline/test-category-diagnostic.log-expected.json

Lines changed: 3050 additions & 0 deletions
Large diffs are not rendered by default.

packages/symantec_endpoint_security/data_stream/event/_dev/test/pipeline/test-category-security.log

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

packages/symantec_endpoint_security/data_stream/event/_dev/test/pipeline/test-category-security.log-expected.json

Lines changed: 2435 additions & 0 deletions
Large diffs are not rendered by default.

packages/symantec_endpoint_security/data_stream/event/elasticsearch/ingest_pipeline/pipeline_category_application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ processors:
99
field: event.category
1010
tag: append_event_category_file
1111
value: file
12-
if: ctx.ses.type_id == '5'
12+
if: ctx.ses?.type_id == '5'
1313
- append:
1414
field: event.category
1515
tag: append_event_category_configuration
@@ -19,7 +19,7 @@ processors:
1919
field: event.type
2020
tag: append_event_type_change
2121
value: change
22-
if: ctx.ses.type_id == '4'
22+
if: ctx.ses?.type_id == '4'
2323
- append:
2424
field: event.type
2525
tag: append_event_type_info

packages/symantec_endpoint_security/data_stream/event/elasticsearch/ingest_pipeline/pipeline_category_audit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ processors:
99
field: event.category
1010
tag: append_event_category_session
1111
value: session
12-
if: ctx.ses.type_id == '20'
12+
if: ctx.ses?.type_id == '20'
1313
- append:
1414
field: event.category
1515
tag: append_event_category_configuration
1616
value: configuration
17-
if: ctx.ses.type_id == '22'
17+
if: ctx.ses?.type_id == '22'
1818
- append:
1919
field: event.type
2020
tag: append_event_type_info

packages/symantec_endpoint_security/data_stream/event/elasticsearch/ingest_pipeline/pipeline_category_security.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ processors:
99
field: event.category
1010
tag: append_event_category_session
1111
value: session
12-
if: ctx.ses.type_id == '8026'
12+
if: ctx.ses?.type_id == '8026'
1313
- append:
1414
field: event.category
1515
tag: append_event_category_process
1616
value: process
17-
if: ctx.ses.type_id == '8027'
17+
if: ctx.ses?.type_id == '8027'
1818
- append:
1919
field: event.category
2020
tag: append_event_category_driver
2121
value: driver
22-
if: ctx.ses.type_id == '8030'
22+
if: ctx.ses?.type_id == '8030'
2323
- append:
2424
field: event.category
2525
tag: append_event_category_file
2626
value: file
27-
if: ctx.ses.type_id == '8031'
27+
if: ctx.ses?.type_id == '8031'
2828
- append:
2929
field: event.category
3030
tag: append_event_category_network
3131
value: network
32-
if: ctx.ses.type_id == '8040'
32+
if: ctx.ses?.type_id == '8040'
3333
- append:
3434
field: event.category
3535
tag: append_event_category_registry

packages/symantec_endpoint_security/data_stream/event/elasticsearch/ingest_pipeline/pipeline_category_system.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ processors:
99
field: event.category
1010
tag: append_event_category_session
1111
value: session
12-
if: ctx.ses.type_id == '8000'
12+
if: ctx.ses?.type_id == '8000'
1313
- append:
1414
field: event.category
1515
tag: append_event_category_process

packages/symantec_endpoint_security/data_stream/event/elasticsearch/ingest_pipeline/pipeline_object_actor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ processors:
295295
field: ses.actor.file.rep_score_band
296296
tag: convert_actor_file_rep_score_band_to_long
297297
type: long
298-
if: ctx.ses.actor.file.rep_score_band != ''
298+
if: ctx.ses?.actor?.file?.rep_score_band != ''
299299
ignore_missing: true
300300
on_failure:
301301
- append:
@@ -353,7 +353,7 @@ processors:
353353
field: ses.actor.file.signature_level_id
354354
tag: convert_actor_file_signature_level_id_to_string
355355
type: string
356-
if: ctx.ses.actor.file.signature_level_id != ''
356+
if: ctx.ses?.actor?.file?.signature_level_id != ''
357357
ignore_missing: true
358358
on_failure:
359359
- append:
@@ -372,7 +372,7 @@ processors:
372372
field: ses.actor.file.signature_value
373373
tag: convert_actor_file_signature_value_to_long
374374
type: long
375-
if: ctx.ses.actor.file.signature_value != ''
375+
if: ctx.ses?.actor?.file?.signature_value != ''
376376
ignore_missing: true
377377
on_failure:
378378
- append:
@@ -402,7 +402,7 @@ processors:
402402
field: ses.actor.file.size
403403
tag: convert_actor_file_size_to_long
404404
type: long
405-
if: ctx.ses?.actor?.file.size != ''
405+
if: ctx.ses?.actor?.file?.size != ''
406406
ignore_missing: true
407407
on_failure:
408408
- append:
@@ -1046,7 +1046,7 @@ processors:
10461046
field: ses.actor.session.id
10471047
tag: convert_actor_session_id_to_string
10481048
type: string
1049-
if: ctx.ses?.actor?.session.id != ''
1049+
if: ctx.ses?.actor?.session?.id != ''
10501050
ignore_missing: true
10511051
on_failure:
10521052
- append:

0 commit comments

Comments
 (0)