Skip to content

Commit

Permalink
typecheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallmain committed Mar 6, 2020
1 parent ba621f6 commit 041a34f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 31 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/endpoint/common/generate_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export class EndpointDocGenerator {
uptime: 0,
user: 'SYSTEM',
entity_id: entityID,
executable: 'C:/malware.exe',
parent: parentEntityID ? { entity_id: parentEntityID, pid: 1 } : undefined,
token: {
domain: 'NT AUTHORITY',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/endpoint/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export type AlertEvent = Immutable<{
pe?: {
imphash: string;
};
executable?: string;
executable: string;
sid?: string;
start: number;
malware_classifier?: MalwareClassifierFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { I18nProvider, FormattedMessage } from '@kbn/i18n/react';
import { Route, Switch, BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import { Store } from 'redux';
import seedrandom from 'seedrandom';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { RouteCapture } from './view/route_capture';
import { appStoreFactory } from './store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import { EndpointResultList } from '../../../../../common/types';
import { EndpointDocGenerator } from '../../../../../common/generate_data';

export const mockHostResultList: (options?: {
total?: number;
Expand All @@ -25,33 +26,8 @@ export const mockHostResultList: (options?: {

const endpoints = [];
for (let index = 0; index < actualCountToReturn; index++) {
endpoints.push({
'@timestamp': new Date(1582231151055).toString(),
event: {
created: new Date('2020-02-20T20:39:11.055Z'),
},
endpoint: {
policy: {
id: '00000000-0000-0000-0000-000000000000',
},
},
agent: {
version: '6.9.2',
id: '9a87fdac-e6c0-4f27-a25c-e349e7093cb1',
},
host: {
id: '3ca26fe5-1c7d-42b8-8763-98256d161c9f',
hostname: 'bea-0.example.com',
ip: ['10.154.150.114', '10.43.37.62', '10.217.73.149'],
mac: ['ea-5a-a8-c0-5-95', '7e-d8-fe-7f-b6-4e', '23-31-5d-af-e6-2b'],
os: {
name: 'windows 6.2',
full: 'Windows Server 2012',
version: '6.2',
variant: 'Windows Server Release 2',
},
},
});
const generator = new EndpointDocGenerator('seed');
endpoints.push(generator.generateEndpointMetadata());
}
const mock: EndpointResultList = {
endpoints,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ export const SourceProcessAccordion = memo(({ alertData }: { alertData: Immutabl
title: i18n.translate('xpack.endpoint.application.endpoint.alertDetails.malwareScore', {
defaultMessage: 'MalwareScore',
}),
description: alertData.process.malware_classifier?.score,
description: alertData.process.malware_classifier?.score || '-',
},
{
title: i18n.translate('xpack.endpoint.application.endpoint.alertDetails.parentProcessID', {
defaultMessage: 'Parent Process ID',
}),
description: alertData.process.parent?.pid,
description: alertData.process.parent?.pid || '-',
},
{
title: i18n.translate('xpack.endpoint.application.endpoint.alertDetails.signer', {
Expand Down

0 comments on commit 041a34f

Please sign in to comment.