-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds panel views and drilldowns to Resolver
- Loading branch information
Showing
29 changed files
with
2,557 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/security_solution/common/endpoint/models/event.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { EndpointDocGenerator } from '../generate_data'; | ||
import { descriptiveName } from './event'; | ||
|
||
describe('Event descriptive names', () => { | ||
let generator: EndpointDocGenerator; | ||
beforeEach(() => { | ||
generator = new EndpointDocGenerator('seed'); | ||
}); | ||
|
||
it('returns the right name for a registry event', () => { | ||
const extensions = { registry: { key: `HKLM/Windows/Software/abc` } }; | ||
const event = generator.generateEvent({ eventCategory: 'registry', extensions }); | ||
expect(descriptiveName(event)).toEqual({ subject: `HKLM/Windows/Software/abc` }); | ||
}); | ||
|
||
it('returns the right name for a network event', () => { | ||
const randomIP = `${generator.randomIP()}`; | ||
const extensions = { network: { direction: 'outbound', forwarded_ip: randomIP } }; | ||
const event = generator.generateEvent({ eventCategory: 'network', extensions }); | ||
expect(descriptiveName(event)).toEqual({ subject: `${randomIP}`, descriptor: 'outbound' }); | ||
}); | ||
|
||
it('returns the right name for a file event', () => { | ||
const extensions = { file: { path: 'C:\\My Documents\\business\\January\\processName' } }; | ||
const event = generator.generateEvent({ eventCategory: 'file', extensions }); | ||
expect(descriptiveName(event)).toEqual({ | ||
subject: 'C:\\My Documents\\business\\January\\processName', | ||
}); | ||
}); | ||
|
||
it('returns the right name for a dns event', () => { | ||
const extensions = { dns: { question: { name: `${generator.randomIP()}` } } }; | ||
const event = generator.generateEvent({ eventCategory: 'dns', extensions }); | ||
expect(descriptiveName(event)).toEqual({ subject: extensions.dns.question.name }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.