Skip to content

Commit 79eb9b7

Browse files
authored
Use process.executable instead of process.path (#79216)
1 parent b9a7983 commit 79eb9b7

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('When invoking Trusted Apps Schema', () => {
7676
os: 'windows',
7777
entries: [
7878
{
79-
field: 'process.path.text',
79+
field: 'process.executable.text',
8080
type: 'match',
8181
operator: 'included',
8282
value: 'c:/programs files/Anti-Virus',
@@ -204,7 +204,7 @@ describe('When invoking Trusted Apps Schema', () => {
204204
field: 'process.hash.*',
205205
value: 'A4370C0CF81686C0B696FA6261c9d3e0d810ae704ab8301839dffd5d5112f476',
206206
},
207-
{ field: 'process.path.text', value: '/tmp/dir1' },
207+
{ field: 'process.executable.text', value: '/tmp/dir1' },
208208
].forEach((partialEntry) => {
209209
const bodyMsg3 = {
210210
...getCreateTrustedAppItem(),

x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const PostTrustedAppCreateRequestSchema = {
3535
schema.object({
3636
field: schema.oneOf([
3737
schema.literal('process.hash.*'),
38-
schema.literal('process.path.text'),
38+
schema.literal('process.executable.text'),
3939
]),
4040
type: schema.literal('match'),
4141
operator: schema.literal('included'),

x-pack/plugins/security_solution/common/endpoint/types/trusted_apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface PostTrustedAppCreateResponse {
3333
}
3434

3535
export interface MacosLinuxConditionEntry {
36-
field: 'process.hash.*' | 'process.path.text';
36+
field: 'process.hash.*' | 'process.executable.text';
3737
type: 'match';
3838
operator: 'included';
3939
value: string;

x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/components/condition_entry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const ConditionEntry = memo<ConditionEntryProps>(
8383
'xpack.securitySolution.trustedapps.logicalConditionBuilder.entry.field.path',
8484
{ defaultMessage: 'Path' }
8585
),
86-
value: 'process.path.text',
86+
value: 'process.executable.text',
8787
},
8888
];
8989
}, []);

x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/index.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ storiesOf('TrustedApps|TrustedAppCard', module)
3030
trustedApp.created_at = '2020-09-17T14:52:33.899Z';
3131
trustedApp.entries = [
3232
{
33-
field: 'process.path.text',
33+
field: 'process.executable.text',
3434
operator: 'included',
3535
type: 'match',
3636
value: '/some/path/on/file/system',
@@ -44,7 +44,7 @@ storiesOf('TrustedApps|TrustedAppCard', module)
4444
trustedApp.created_at = '2020-09-17T14:52:33.899Z';
4545
trustedApp.entries = [
4646
{
47-
field: 'process.path.text',
47+
field: 'process.executable.text',
4848
operator: 'included',
4949
type: 'match',
5050
value: '/some/path/on/file/system',

x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/trusted_apps.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ describe('when invoking endpoint trusted apps route handlers', () => {
240240
os: 'windows',
241241
entries: [
242242
{
243-
field: 'process.path.text',
243+
field: 'process.executable.text',
244244
type: 'match',
245245
operator: 'included',
246246
value: 'c:/programs files/Anti-Virus',
@@ -293,7 +293,7 @@ describe('when invoking endpoint trusted apps route handlers', () => {
293293
description: 'this one is ok',
294294
entries: [
295295
{
296-
field: 'process.path.text',
296+
field: 'process.executable.text',
297297
operator: 'included',
298298
type: 'match',
299299
value: 'c:/programs files/Anti-Virus',
@@ -320,7 +320,7 @@ describe('when invoking endpoint trusted apps route handlers', () => {
320320
description: 'this one is ok',
321321
entries: [
322322
{
323-
field: 'process.path.text',
323+
field: 'process.executable.text',
324324
operator: 'included',
325325
type: 'match',
326326
value: 'c:/programs files/Anti-Virus',
@@ -357,7 +357,7 @@ describe('when invoking endpoint trusted apps route handlers', () => {
357357
it('should trim condition entry values', async () => {
358358
const newTrustedApp = createNewTrustedAppBody();
359359
newTrustedApp.entries.push({
360-
field: 'process.path.text',
360+
field: 'process.executable.text',
361361
value: '\n some value \r\n ',
362362
operator: 'included',
363363
type: 'match',
@@ -366,13 +366,13 @@ describe('when invoking endpoint trusted apps route handlers', () => {
366366
await routeHandler(context, request, response);
367367
expect(exceptionsListClient.createExceptionListItem.mock.calls[0][0].entries).toEqual([
368368
{
369-
field: 'process.path.text',
369+
field: 'process.executable.text',
370370
operator: 'included',
371371
type: 'match',
372372
value: 'c:/programs files/Anti-Virus',
373373
},
374374
{
375-
field: 'process.path.text',
375+
field: 'process.executable.text',
376376
value: 'some value',
377377
operator: 'included',
378378
type: 'match',
@@ -392,7 +392,7 @@ describe('when invoking endpoint trusted apps route handlers', () => {
392392
await routeHandler(context, request, response);
393393
expect(exceptionsListClient.createExceptionListItem.mock.calls[0][0].entries).toEqual([
394394
{
395-
field: 'process.path.text',
395+
field: 'process.executable.text',
396396
operator: 'included',
397397
type: 'match',
398398
value: 'c:/programs files/Anti-Virus',

0 commit comments

Comments
 (0)