22
22
{
23
23
let commandlineField = "object.process.cmdline" ;
24
24
let events ;
25
- if ( pre_events [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
25
+ if ( pre_events [ 0 ] && 'msgid' in pre_events [ 0 ] && pre_events [ 0 ] [ 'msgid' ] !== null && pre_events [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
26
26
events = pre_events . map ( x => ( {
27
27
...x ,
28
28
tree_id : x [ 'object.process.id' ] ,
29
29
tree_parent_id : x [ 'object.process.parent.id' ]
30
30
} ) ) ;
31
31
}
32
32
else {
33
- if ( 'object.process.guid' in pre_events [ 0 ] && pre_events [ 0 ] [ 'object.process.guid' ] != null ) {
33
+ if ( pre_events [ 0 ] && 'object.process.guid' in pre_events [ 0 ] && pre_events [ 0 ] [ 'object.process.guid' ] != null ) {
34
34
events = pre_events . map ( x => ( {
35
35
...x ,
36
36
tree_id : x [ 'object.process.guid' ] ,
@@ -112,7 +112,7 @@ async function processTreeBranch(pre_events, outputelemsuffix="")
112
112
{
113
113
let commandlineField = "object.process.cmdline" ;
114
114
let events ;
115
- if ( treeBranchEvents [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
115
+ if ( 'msgid' in treeBranchEvents [ 0 ] && treeBranchEvents [ 0 ] [ 'msgid' ] !== null && treeBranchEvents [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
116
116
events = treeBranchEvents . map ( x => ( {
117
117
...x ,
118
118
tree_id : x [ 'object.process.id' ] ,
@@ -251,7 +251,7 @@ async function processTreeBranchReverse(pre_events, outputelemsuffix="")
251
251
{
252
252
let commandlineField = "object.process.cmdline" ;
253
253
let events ;
254
- if ( treeBranchEvents [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
254
+ if ( 'msgid' in treeBranchEvents [ 0 ] && treeBranchEvents [ 0 ] [ 'msgid' ] !== null && treeBranchEvents [ 0 ] [ 'msgid' ] . includes ( "exec" ) ) {
255
255
events = treeBranchEvents . map ( x => ( {
256
256
...x ,
257
257
tree_id : x [ 'object.process.id' ] ,
@@ -482,4 +482,4 @@ function saveFile (name, type, data) {
482
482
a . remove ( ) ;
483
483
}
484
484
485
- var siemUrl = window . location . origin ;
485
+ var siemUrl = window . location . origin ;
0 commit comments