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
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, destination 9.99.99.9:6789, by test-user on host created medium alert my-rule."`
`"item one, item two event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, destination 9.99.99.9:6789, by test-user on host created medium alert my-rule."`
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, destination 9.99.99.9:6789, by test-user created medium alert my-rule."`
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, destination 9.99.99.9:6789, on host created medium alert my-rule."`
87
+
);
88
+
});
89
+
});
90
+
describe('when rule and mergedDoc are provided, but destination details are missing',()=>{
91
+
it('should return the reason message without the destination port',()=>{
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, destination 9.99.99.9 by test-user on host created medium alert my-rule."`
103
+
);
104
+
});
105
+
it('should return the reason message without destination details',()=>{
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1:1234, by test-user on host created medium alert my-rule."`
118
+
);
119
+
});
120
+
});
121
+
describe('when rule and mergedDoc are provided, but source details are missing',()=>{
122
+
it('should return the reason message without the source port',()=>{
`"test event with process doingThings.exe, parent process didThings.exe, file sample, source 1.11.11.1 destination 9.99.99.9:6789, by test-user on host created medium alert my-rule."`
132
+
);
133
+
});
134
+
it('should return the reason message without source details',()=>{
`"test event with process doingThings.exe, parent process didThings.exe, file sample, destination 9.99.99.9:6789, by test-user on host created medium alert my-rule."`
145
+
);
146
+
});
147
+
});
148
+
describe('when rule and mergedDoc are provided, but process details missing',()=>{
149
+
it('should return the reason message without process details',()=>{
'Alert {alertName} created with a {alertSeverity} severity and risk score of {alertRiskScore}{userName, select, null {} other {{whitespace}by {userName}} }{hostName, select, null {} other {{whitespace}on {hostName}} }.',
90
+
defaultMessage: `{eventCategory, select, null {} other {{eventCategory}{whitespace}}}event\
91
+
{hasFieldOfInterest, select, false {} other {{whitespace}with}}\
92
+
{processName, select, null {} other {{whitespace}process {processName},} }\
93
+
{processParentName, select, null {} other {{whitespace}parent process {processParentName},} }\
94
+
{fileName, select, null {} other {{whitespace}file {fileName},} }\
95
+
{sourceAddress, select, null {} other {{whitespace}source {sourceAddress}}}{sourcePort, select, null {} other {:{sourcePort},}}\
96
+
{destinationAddress, select, null {} other {{whitespace}destination {destinationAddress}}}{destinationPort, select, null {} other {:{destinationPort},}}\
97
+
{userName, select, null {} other {{whitespace}by {userName}} }\
98
+
{hostName, select, null {} other {{whitespace}on {hostName}} } \
hasFieldOfInterest: fieldPresenceTracker.hasFieldOfInterest,// Tracking if we have any fields to show the 'with' word
49
114
whitespace: ' ',// there isn't support for the unicode /u0020 for whitespace, and leading spaces are deleted, so to prevent double-whitespace explicitly passing the space in.
0 commit comments