[Cloud Posture] feat: add event matching to ecs spec (#139015)

This commit is contained in:
Oleg Sucharevich 2022-09-06 18:32:46 +03:00 committed by GitHub
parent 5adda1f63b
commit 02c17ccbf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -12,6 +12,7 @@ import { FindingsTable } from './latest_findings_table';
import type { PropsOf } from '@elastic/eui';
import Chance from 'chance';
import type { CspFinding } from '../types';
import type { EcsEvent } from '@kbn/logging';
import { TestProvider } from '../../../test/test_provider';
const chance = new Chance();
@ -61,9 +62,9 @@ const getFakeFindings = (name: string): CspFinding & { id: string } => ({
sub_type: chance.string(),
id: chance.string(),
},
cycle_id: chance.string(),
host: {} as any,
ecs: {} as any,
event: {} as EcsEvent,
'@timestamp': new Date().toISOString(),
});

View file

@ -7,6 +7,7 @@
import type { Criteria } from '@elastic/eui';
import type { DataView } from '@kbn/data-views-plugin/common';
import type { BoolQuery, Filter, Query } from '@kbn/es-query';
import type { EcsEvent } from '@kbn/logging';
import type { CspRuleMetadata } from '../../../common/schemas';
export type FindingsGroupByKind = 'default' | 'resource';
@ -29,11 +30,11 @@ export interface FindingsBaseEsQuery {
// TODO: this needs to be defined in a versioned schema
export interface CspFinding {
'@timestamp': string;
cycle_id: string;
result: CspFindingResult;
resource: CspFindingResource;
rule: CspRuleMetadata;
host: CspFindingHost;
event: EcsEvent;
agent: CspFindingAgent;
ecs: {
version: string;