Skip to content

Commit 9ae7d43

Browse files
Merge branch '8.x' into backport/8.x/pr-192906
2 parents 22ff0a5 + 014add7 commit 9ae7d43

46 files changed

Lines changed: 1673 additions & 312 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@
11731173
"pretty-ms": "6.0.0",
11741174
"prop-types": "^15.8.1",
11751175
"proxy-from-env": "1.0.0",
1176-
"puppeteer": "22.13.1",
1176+
"puppeteer": "23.3.1",
11771177
"query-string": "^6.13.2",
11781178
"rbush": "^3.0.1",
11791179
"re-resizable": "^6.9.9",

packages/kbn-generate-console-definitions/src/types/specification_types.ts

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface DictionaryOf {
9292
}
9393

9494
/**
95-
* A user defined value. To be used when bubbling a generic parameter up to the top-level interface is
95+
* A user defined value. To be used when bubbling a generic parameter up to the top-level class is
9696
* inconvenient or impossible (e.g. for lists of user-defined values of possibly different types).
9797
*
9898
* Clients will allow providing a serializer/deserializer when reading/writing properties of this type,
@@ -139,7 +139,7 @@ export interface Property {
139139
codegenName?: string;
140140
/** An optional set of aliases for `name` */
141141
aliases?: string[];
142-
/** If the enclosing interface is a variants container, is this a property of the container and not a variant? */
142+
/** If the enclosing class is a variants container, is this a property of the container and not a variant? */
143143
containerProperty?: boolean;
144144
/** If this property has a quirk that needs special attention, give a short explanation about it */
145145
esQuirk?: string;
@@ -181,7 +181,7 @@ export interface BaseType {
181181
specLocation: string;
182182
}
183183

184-
export type Variants = ExternalTag | InternalTag | Container;
184+
export type Variants = ExternalTag | InternalTag | Container | Untagged;
185185

186186
export interface VariantBase {
187187
/**
@@ -208,6 +208,11 @@ export interface Container extends VariantBase {
208208
kind: 'container';
209209
}
210210

211+
export interface Untagged extends VariantBase {
212+
kind: 'untagged';
213+
untypedVariant: TypeName;
214+
}
215+
211216
/**
212217
* Inherits clause (aka extends or implements) for an interface or request
213218
*/
@@ -216,6 +221,12 @@ export interface Inherits {
216221
generics?: ValueOf[];
217222
}
218223

224+
export interface Behavior {
225+
type: TypeName;
226+
generics?: ValueOf[];
227+
meta?: Record<string, string>;
228+
}
229+
219230
/**
220231
* An interface type
221232
*/
@@ -232,7 +243,7 @@ export interface Interface extends BaseType {
232243
/**
233244
* Behaviors directly implemented by this interface
234245
*/
235-
behaviors?: Inherits[];
246+
behaviors?: Behavior[];
236247

237248
/**
238249
* Behaviors attached to this interface, coming from the interface itself (see `behaviors`)
@@ -271,12 +282,12 @@ export interface Request extends BaseType {
271282
// We can also pull path parameter descriptions on body properties they replace
272283

273284
/**
274-
* Body type. Most often a list of properties (that can extend those of the inherited interface, see above), except for a
285+
* Body type. Most often a list of properties (that can extend those of the inherited class, see above), except for a
275286
* few specific cases that use other types such as bulk (array) or create (generic parameter). Or NoBody for requests
276287
* that don't have a body.
277288
*/
278289
body: Body;
279-
behaviors?: Inherits[];
290+
behaviors?: Behavior[];
280291
attachedBehaviors?: string[];
281292
}
282293

@@ -287,7 +298,7 @@ export interface Response extends BaseType {
287298
kind: 'response';
288299
generics?: TypeName[];
289300
body: Body;
290-
behaviors?: Inherits[];
301+
behaviors?: Behavior[];
291302
attachedBehaviors?: string[];
292303
exceptions?: ResponseException[];
293304
}
@@ -335,6 +346,7 @@ export interface EnumMember {
335346
description?: string;
336347
deprecation?: Deprecation;
337348
since?: string;
349+
availability?: Availabilities;
338350
}
339351

340352
/**
@@ -358,8 +370,11 @@ export interface TypeAlias extends BaseType {
358370
type: ValueOf;
359371
/** generic parameters: either concrete types or open parameters from the enclosing type */
360372
generics?: TypeName[];
361-
/** Only applicable to `union_of` aliases: identify typed_key unions (external) and variant inventories (internal) */
362-
variants?: InternalTag | ExternalTag;
373+
/**
374+
* Only applicable to `union_of` aliases: identify typed_key unions (external), variant inventories (internal)
375+
* and untagged variants
376+
*/
377+
variants?: InternalTag | ExternalTag | Untagged;
363378
}
364379

365380
// ------------------------------------------------------------------------------------------------
@@ -438,6 +453,14 @@ export interface UrlTemplate {
438453
}
439454

440455
export interface Model {
456+
_info?: {
457+
title: string;
458+
license: {
459+
name: string;
460+
url: string;
461+
};
462+
};
463+
441464
types: TypeDefinition[];
442465
endpoints: Endpoint[];
443466
}

packages/kbn-screenshotting-server/src/paths.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ export class ChromiumArchivePaths {
4646
platform: 'darwin',
4747
architecture: 'x64',
4848
archiveFilename: 'chrome-mac.zip',
49-
archiveChecksum: 'fa8004f3c8c5574c089c901e48429d1b01720bf3dd25e05ac56c41d0ab470c10',
50-
binaryChecksum: '56f25cb6881e5c2b1aac0d8e87630517d1af8effdc9319d35f872add048df1ca',
49+
archiveChecksum: '0a3d18efd00b3406f66139a673616b4b2b4b00323776678cb82295996f5a6733',
50+
binaryChecksum: '8bcdaa973ee11110f6b70eaac2418fda3bb64446cf37f964fce331cdc8907a20',
5151
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
52-
revision: 1300317, // 1300313 is not available for Mac_x64
52+
revision: 1331485, // 1331488 is not available for Mac_x64
5353
location: 'common',
5454
archivePath: 'Mac',
5555
isPreInstalled: false,
@@ -58,44 +58,44 @@ export class ChromiumArchivePaths {
5858
platform: 'darwin',
5959
architecture: 'arm64',
6060
archiveFilename: 'chrome-mac.zip',
61-
archiveChecksum: 'bea49fd3ccd6aaccd7cdc4df38306f002a2934aaa2c044f3b5a3272b31ec77ca',
62-
binaryChecksum: '4c55d9e47deb1179c377c9785afdcdb5f3d3f351bff62b414d43e32ff195bd55',
61+
archiveChecksum: '426eddf16acb88b9446a91de53cc4364c7d487414248f33e30f68cf488cea0c0',
62+
binaryChecksum: '827931739bfdd2b6790a81d5ade8886c159cd051581d79b84d1ede447293e9cf',
6363
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
64-
revision: 1300314, // 1300313 is not available for Mac_Arm
64+
revision: 1331488,
6565
location: 'common',
6666
archivePath: 'Mac_Arm',
6767
isPreInstalled: false,
6868
},
6969
{
7070
platform: 'linux',
7171
architecture: 'x64',
72-
archiveFilename: 'chromium-5b5d829-locales-linux_x64.zip',
73-
archiveChecksum: '799e8fd5f47ea70b8a3972d39b2617c9cbebc7fc433a89251dae312a7c77534b',
74-
binaryChecksum: '216b8f7ff9b41e985397342c2df54e4f8e07a01a3b8a929f39b9a10931d26ff5',
72+
archiveFilename: 'chromium-fe621c5-locales-linux_x64.zip',
73+
archiveChecksum: '12ce2e0eac184072dfcbc7a267328e3eb7fbe10a682997f4111c0378f2397341',
74+
binaryChecksum: '670481cfa8db209401106cd23051009d390c03608724d0822a12c8c0a92b4c25',
7575
binaryRelativePath: 'headless_shell-linux_x64/headless_shell',
76-
revision: 1300313,
76+
revision: 1331488,
7777
location: 'custom',
7878
isPreInstalled: true,
7979
},
8080
{
8181
platform: 'linux',
8282
architecture: 'arm64',
83-
archiveFilename: 'chromium-5b5d829-locales-linux_arm64.zip',
84-
archiveChecksum: '961e20c45c61f8e948efdc4128bb17c23217bbcb28537f270ccf5bf0826981e7',
85-
binaryChecksum: 'fc4027fb6b1c96bef9374d5d9f791097fae2ec2ddc4e0134167075bd52d1458f',
83+
archiveFilename: 'chromium-fe621c5-locales-linux_arm64.zip',
84+
archiveChecksum: 'f7333eaff5235046c8775f0c1a0b7395b7ebc2e054ea638710cf511c4b6f9daf',
85+
binaryChecksum: '8a3a3371b3d04f4b0880b137a3611c223e0d8e65a218943cb7be1ec4a91f5e35',
8686
binaryRelativePath: 'headless_shell-linux_arm64/headless_shell',
87-
revision: 1300313,
87+
revision: 1331488,
8888
location: 'custom',
8989
isPreInstalled: true,
9090
},
9191
{
9292
platform: 'win32',
9393
architecture: 'x64',
9494
archiveFilename: 'chrome-win.zip',
95-
archiveChecksum: '27a2ed1473cefc6f48ff5665faa1fbcc69ef5be47ee21777a60e87c8379fdd93',
96-
binaryChecksum: 'd603401a5e6f8bd734b329876e4221a4d24a1999f14df6e32eeb5e6a72520d96',
95+
archiveChecksum: 'fa62be702f55f37e455bab4291c59ceb40e81e1922d30cf9453a4ee176b909bc',
96+
binaryChecksum: '1345e66583bad1a1f16885f381d1173de8bf931487da9ba155e1b58bf23b2c66',
9797
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
98-
revision: 1300320, // 1300313 is not available for win32
98+
revision: 1331487, // 1331488 is not available for win32
9999
location: 'common',
100100
archivePath: 'Win',
101101
isPreInstalled: true,

test/functional/apps/dashboard/group1/url_field_formatter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3737
expect(currentUrl).to.equal(fieldUrl);
3838
};
3939

40-
describe('Changing field formatter to Url', () => {
40+
// Fails in chrome 129+: https://github.com/elastic/kibana-operations/issues/199
41+
describe.skip('Changing field formatter to Url', () => {
4142
before(async function () {
4243
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
4344
await kibanaServer.savedObjects.cleanStandardList();

test/functional/apps/dashboard/group5/embed_mode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function ({
5757
await browser.setWindowSize(1300, 900);
5858
});
5959

60-
// Fails in with chrome 128+ https://github.com/elastic/kibana/issues/163207
60+
// Fails in chrome 128+ https://github.com/elastic/kibana-operations/issues/199
6161
describe.skip('default URL params', () => {
6262
it('hides the chrome', async () => {
6363
const globalNavShown = await globalNav.exists();
@@ -92,7 +92,7 @@ export default function ({
9292
});
9393
});
9494

95-
// Fails in with chrome 128+ https://github.com/elastic/kibana/issues/163207
95+
// Fails in chrome 128+ https://github.com/elastic/kibana-operations/issues/199
9696
describe.skip('non-default URL params', () => {
9797
it('shows or hides elements based on URL params', async () => {
9898
const currentUrl = await browser.getCurrentUrl();

test/functional/apps/discover/group6/_time_field_column.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
308308
});
309309
});
310310

311-
it('should render selected columns correctly', async () => {
311+
// Fails in chrome 129+: https://github.com/elastic/kibana-operations/issues/199
312+
it.skip('should render selected columns correctly', async () => {
312313
await discover.selectTextBaseLang();
313314

314315
await checkSelectedColumns({

x-pack/build_chromium/linux/args.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ v8_symbol_level = 0
1717
enable_ink = false
1818
rtc_build_examples = false
1919
angle_build_tests = false
20-
enable_screen_ai_service = false
20+
use_fake_screen_ai = true
2121
enable_vr = false
2222

2323
# Please, consult @elastic/kibana-security before changing/removing this option.

x-pack/packages/kbn-cloud-security-posture-common/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type {
1717
BaseCspSetupStatus,
1818
CspSetupStatus,
1919
} from './types/status';
20-
export type { CspFinding } from './types/findings';
20+
export type { CspFinding, CspFindingResult } from './types/findings';
2121
export type { BenchmarksCisId } from './types/benchmark';
2222
export * from './constants';
2323
export {

x-pack/packages/kbn-cloud-security-posture-common/types/findings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface CspFindingCloud {
4141
region?: string;
4242
}
4343

44-
interface CspFindingResult {
44+
export interface CspFindingResult {
4545
evaluation: 'passed' | 'failed';
4646
expected?: Record<string, unknown>;
4747
evidence: Record<string, unknown>;
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
import { useQuery } from '@tanstack/react-query';
8+
import { lastValueFrom } from 'rxjs';
9+
import { CspFinding } from '@kbn/cloud-security-posture-common';
10+
import { useKibana } from '@kbn/kibana-react-plugin/public';
11+
import type { CoreStart } from '@kbn/core/public';
12+
import { showErrorToast } from '../..';
13+
import type {
14+
CspClientPluginStartDeps,
15+
LatestFindingsRequest,
16+
LatestFindingsResponse,
17+
UseMisconfigurationOptions,
18+
} from '../../type';
19+
20+
import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api';
21+
import {
22+
buildMisconfigurationsFindingsQuery,
23+
getMisconfigurationAggregationCount,
24+
} from '../utils/hooks_utils';
25+
26+
export const useMisconfigurationFindings = (options: UseMisconfigurationOptions) => {
27+
const {
28+
data,
29+
notifications: { toasts },
30+
} = useKibana<CoreStart & CspClientPluginStartDeps>().services;
31+
const { data: rulesStates } = useGetCspBenchmarkRulesStatesApi();
32+
33+
return useQuery(
34+
['csp_misconfiguration_findings', { params: options }, rulesStates],
35+
async () => {
36+
const {
37+
rawResponse: { hits, aggregations },
38+
} = await lastValueFrom(
39+
data.search.search<LatestFindingsRequest, LatestFindingsResponse>({
40+
params: buildMisconfigurationsFindingsQuery(options, rulesStates!),
41+
})
42+
);
43+
if (!aggregations) throw new Error('expected aggregations to be defined');
44+
45+
return {
46+
count: getMisconfigurationAggregationCount(aggregations.count.buckets),
47+
rows: hits.hits.map((finding) => ({
48+
result: finding._source?.result,
49+
rule: finding?._source?.rule,
50+
resource: finding?._source?.resource,
51+
})) as Array<Pick<CspFinding, 'result' | 'rule' | 'resource'>>,
52+
};
53+
},
54+
{
55+
enabled: options.enabled && !!rulesStates,
56+
keepPreviousData: true,
57+
onError: (err: Error) => showErrorToast(toasts, err),
58+
}
59+
);
60+
};

0 commit comments

Comments
 (0)