-
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.
Merge branch 'main' into flyout-history
- Loading branch information
Showing
93 changed files
with
499 additions
and
298 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
12 changes: 12 additions & 0 deletions
12
x-pack/packages/kbn-cloud-security-posture-common/jest.config.js
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,12 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../../..', | ||
roots: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture-common'], | ||
}; |
48 changes: 0 additions & 48 deletions
48
x-pack/packages/kbn-cloud-security-posture-common/schema/rules.ts
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
x-pack/packages/kbn-cloud-security-posture-common/schema/rules/index.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,12 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export * as rulesV1 from './v1'; | ||
export * as rulesV2 from './v2'; | ||
export * as rulesV3 from './v3'; | ||
export * as rulesV4 from './v4'; | ||
export * as rulesV5 from './v5'; |
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
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,7 @@ | |
], | ||
"kbn_references": [ | ||
"@kbn/config-schema", | ||
"@kbn/data-views-plugin", | ||
"@kbn/i18n", | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
x-pack/packages/kbn-cloud-security-posture-common/types/benchmark.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,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
export type BenchmarksCisId = 'cis_k8s' | 'cis_azure' | 'cis_aws' | 'cis_eks' | 'cis_gcp'; |
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
51 changes: 51 additions & 0 deletions
51
x-pack/packages/kbn-cloud-security-posture-common/types/status.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,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export type CspStatusCode = | ||
| 'indexed' // latest findings index exists and has results | ||
| 'indexing' // index timeout was not surpassed since installation, assumes data is being indexed | ||
| 'unprivileged' // user lacks privileges for the latest findings index | ||
| 'index-timeout' // index timeout was surpassed since installation | ||
| 'not-deployed' // no healthy agents were deployed | ||
| 'not-installed' // number of installed csp integrations is 0; | ||
| 'waiting_for_results'; // have healthy agents but no findings at all, assumes data is being indexed for the 1st time | ||
|
||
export type IndexStatus = | ||
| 'not-empty' // Index contains documents | ||
| 'empty' // Index doesn't contain documents (or doesn't exist) | ||
| 'unprivileged'; // User doesn't have access to query the index | ||
|
||
export interface IndexDetails { | ||
index: string; | ||
status: IndexStatus; | ||
} | ||
|
||
export interface BaseCspSetupBothPolicy { | ||
status: CspStatusCode; | ||
installedPackagePolicies: number; | ||
healthyAgents: number; | ||
} | ||
|
||
export interface BaseCspSetupStatus { | ||
indicesDetails: IndexDetails[]; | ||
latestPackageVersion: string; | ||
cspm: BaseCspSetupBothPolicy; | ||
kspm: BaseCspSetupBothPolicy; | ||
vuln_mgmt: BaseCspSetupBothPolicy; | ||
isPluginInitialized: boolean; | ||
installedPackageVersion?: string | undefined; | ||
hasMisconfigurationsFindings?: boolean; | ||
} | ||
|
||
export type CspSetupStatus = BaseCspSetupStatus; |
Oops, something went wrong.