mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cloud Posture] Update latest findings index mapping (#131504)
This commit is contained in:
parent
6a5b31cd4f
commit
59c55a4434
4 changed files with 23 additions and 21 deletions
|
@ -37,7 +37,7 @@ const getDescriptionDisplay = (value: unknown) => {
|
|||
return <EuiText size="s">{value as string}</EuiText>;
|
||||
};
|
||||
|
||||
export const prepareDescriptionList = (data: Record<string, unknown>) =>
|
||||
export const prepareDescriptionList = (data: any) =>
|
||||
Object.entries(getFlattenedObject(data))
|
||||
.sort((a, b) => a[0].localeCompare(b[0]))
|
||||
.map(([key, value]) => ({
|
||||
|
|
|
@ -51,11 +51,10 @@ const getFakeFindings = (name: string): CspFinding & { id: string } => ({
|
|||
},
|
||||
resource: {
|
||||
name: chance.string(),
|
||||
filename: chance.string(),
|
||||
type: chance.string(),
|
||||
path: chance.string(),
|
||||
uid: chance.string(),
|
||||
mode: chance.string(),
|
||||
raw: {} as any,
|
||||
sub_type: chance.string(),
|
||||
id: chance.string(),
|
||||
},
|
||||
cycle_id: chance.string(),
|
||||
host: {} as any,
|
||||
|
|
|
@ -63,13 +63,11 @@ interface CspFindingResult {
|
|||
}
|
||||
|
||||
interface CspFindingResource {
|
||||
uid: string;
|
||||
filename: string;
|
||||
// gid: string;
|
||||
mode: string;
|
||||
path: string;
|
||||
type: string;
|
||||
name: string;
|
||||
sub_type: string;
|
||||
raw: object;
|
||||
id: string;
|
||||
type: string;
|
||||
[other_keys: string]: unknown;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ export const latestFindingsMapping: MappingTypeMapping = {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
agent: {
|
||||
properties: {
|
||||
id: {
|
||||
|
@ -49,7 +48,17 @@ export const latestFindingsMapping: MappingTypeMapping = {
|
|||
},
|
||||
resource: {
|
||||
properties: {
|
||||
filename: {
|
||||
type: {
|
||||
type: 'keyword',
|
||||
ignore_above: 256,
|
||||
},
|
||||
id: {
|
||||
type: 'text',
|
||||
},
|
||||
name: {
|
||||
type: 'text',
|
||||
},
|
||||
sub_type: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
keyword: {
|
||||
|
@ -58,18 +67,14 @@ export const latestFindingsMapping: MappingTypeMapping = {
|
|||
},
|
||||
},
|
||||
},
|
||||
type: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
keyword: {
|
||||
ignore_above: 1024,
|
||||
type: 'keyword',
|
||||
},
|
||||
},
|
||||
raw: {
|
||||
type: 'object',
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
resource_id: {
|
||||
// deprecated - the new field is resource.id
|
||||
type: 'text',
|
||||
fields: {
|
||||
keyword: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue