@devtron-labs/devtron-fe-common-lib 0.2.30-beta-3 → 0.2.30-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/index.d.ts +0 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +2 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +8 -9
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +2 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +2 -2
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/{DeploymentConfigDiff.types.d.ts → types.d.ts} +3 -25
- package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +1 -1
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +1 -0
- package/dist/Shared/Components/Security/SecurityModal/SecurityModal.d.ts +14 -0
- package/dist/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/InfoCard.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/Sidebar.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/Table.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/index.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +100 -0
- package/dist/Shared/Components/Security/SecurityModal/config/EmptyState.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/config/InfoCard.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/KubernetesManifest.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/Table.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +3 -0
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +56 -0
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/service.d.ts +5 -0
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +269 -0
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +34 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +3 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +1 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +16 -0
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/Vulnerabilities.d.ts +1 -1
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/index.d.ts +1 -0
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/service.d.ts +1 -1
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/types.d.ts +2 -1
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/utils.d.ts +1 -1
- package/dist/Shared/Components/Security/index.d.ts +3 -0
- package/dist/Shared/Components/index.d.ts +1 -1
- package/dist/Shared/Services/app.types.d.ts +1 -7
- package/dist/Shared/types.d.ts +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CXFTwsNM.js → cssMode-_u5ZYB-Q.js} +1 -1
- package/dist/{freemarker2-DmYtjdHt.js → freemarker2-T5s8hfjd.js} +1 -1
- package/dist/{handlebars-eAvul9Gb.js → handlebars-BOI14TfF.js} +1 -1
- package/dist/{html-CZ0SvRv1.js → html-D5rCJkFR.js} +1 -1
- package/dist/{htmlMode-pSoTbnc_.js → htmlMode-ZkXKsi9b.js} +1 -1
- package/dist/{index-8KYAE4dc.js → index-D4U7W4vE.js} +33832 -32272
- package/dist/index.js +316 -312
- package/dist/{javascript-D2QAbupk.js → javascript-CaNiuZ_w.js} +1 -1
- package/dist/{jsonMode-CLdpt-Pr.js → jsonMode-B797VxQm.js} +1 -1
- package/dist/{liquid-KD66kcRt.js → liquid-2ipK-yL8.js} +1 -1
- package/dist/{mdx-B11nWVy7.js → mdx-BEwXkZN_.js} +1 -1
- package/dist/{python-CNhAJZEL.js → python-CuOXljCz.js} +1 -1
- package/dist/{razor-BkvJGu01.js → razor-DqxSvhvb.js} +1 -1
- package/dist/{tsMode-8yuvsPTz.js → tsMode-CFXBU715.js} +1 -1
- package/dist/{typescript-Cfl8lnfY.js → typescript-DRyxJPcX.js} +1 -1
- package/dist/{xml-B30K5eAQ.js → xml-C97eZhmk.js} +1 -1
- package/dist/{yaml-CH6tzVSB.js → yaml-fRy8fRMO.js} +1 -1
- package/package.json +4 -3
- package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +0 -2
- package/dist/Common/Security/types.d.ts +0 -4
- package/dist/Shared/Components/Vulnerabilities/constants.d.ts +0 -4
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { GenericEmptyStateType } from '../../../../Common/Types';
|
|
3
|
+
import { LastExecutionResultType, NodeType, Nodes } from '../../../types';
|
|
4
|
+
import { SegmentedBarChartProps } from '../../../../Common/SegmentedBarChart';
|
|
5
|
+
export interface GetResourceScanDetailsPayloadType {
|
|
6
|
+
name: string;
|
|
7
|
+
namespace: string;
|
|
8
|
+
group: string;
|
|
9
|
+
version: string;
|
|
10
|
+
kind: Nodes | NodeType;
|
|
11
|
+
clusterId: number;
|
|
12
|
+
appId?: string;
|
|
13
|
+
appType?: number;
|
|
14
|
+
deploymentType?: number;
|
|
15
|
+
isAppDetailView?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface SecurityModalBaseProps {
|
|
18
|
+
handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
|
|
19
|
+
isExternalCI?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface AppDetailsPayload {
|
|
22
|
+
appId?: number | string;
|
|
23
|
+
envId?: number | string;
|
|
24
|
+
installedAppId?: number | string;
|
|
25
|
+
artifactId?: number | string;
|
|
26
|
+
installedAppVersionHistoryId?: number | string;
|
|
27
|
+
}
|
|
28
|
+
export interface ExecutionDetailsPayload extends Partial<Pick<AppDetailsPayload, 'appId' | 'envId'>> {
|
|
29
|
+
imageScanDeployInfoId?: number | string;
|
|
30
|
+
artifactId?: number | string;
|
|
31
|
+
}
|
|
32
|
+
interface SecurityModalAppDetailsPropsType {
|
|
33
|
+
appDetailsPayload: AppDetailsPayload;
|
|
34
|
+
resourceScanPayload?: never;
|
|
35
|
+
executionDetailsPayload?: never;
|
|
36
|
+
}
|
|
37
|
+
interface SecurityModalResourceScanPropsType {
|
|
38
|
+
appDetailsPayload?: never;
|
|
39
|
+
resourceScanPayload: GetResourceScanDetailsPayloadType;
|
|
40
|
+
executionDetailsPayload?: never;
|
|
41
|
+
}
|
|
42
|
+
interface SecurityModalExecutionDetailsPropsType {
|
|
43
|
+
appDetailsPayload?: never;
|
|
44
|
+
resourceScanPayload?: never;
|
|
45
|
+
executionDetailsPayload: ExecutionDetailsPayload;
|
|
46
|
+
}
|
|
47
|
+
export type SecurityModalPropsType = SecurityModalBaseProps & (SecurityModalAppDetailsPropsType | SecurityModalResourceScanPropsType | SecurityModalExecutionDetailsPropsType);
|
|
48
|
+
export declare const CATEGORIES: {
|
|
49
|
+
readonly IMAGE_SCAN: "imageScan";
|
|
50
|
+
readonly CODE_SCAN: "codeScan";
|
|
51
|
+
readonly KUBERNETES_MANIFEST: "kubernetesManifest";
|
|
52
|
+
};
|
|
53
|
+
export declare const SUB_CATEGORIES: {
|
|
54
|
+
readonly VULNERABILITIES: "vulnerability";
|
|
55
|
+
readonly LICENSE: "license";
|
|
56
|
+
readonly MISCONFIGURATIONS: "misConfigurations";
|
|
57
|
+
readonly EXPOSED_SECRETS: "exposedSecrets";
|
|
58
|
+
};
|
|
59
|
+
export declare enum SortOrderEnum {
|
|
60
|
+
'ASC' = 1,
|
|
61
|
+
'DESC' = -1
|
|
62
|
+
}
|
|
63
|
+
export type TableRowCellType = {
|
|
64
|
+
component: React.ReactNode | JSX.Element;
|
|
65
|
+
cellContent: string | object;
|
|
66
|
+
};
|
|
67
|
+
export type TableHeaderCellType = {
|
|
68
|
+
headerText: string;
|
|
69
|
+
isSortable: boolean;
|
|
70
|
+
width: number;
|
|
71
|
+
compareFunc?: (a: TableRowCellType['cellContent'], b: TableRowCellType['cellContent']) => number;
|
|
72
|
+
defaultSortOrder?: SortOrderEnum;
|
|
73
|
+
};
|
|
74
|
+
export interface TableRowType {
|
|
75
|
+
id: string | number;
|
|
76
|
+
cells: Array<TableRowCellType>;
|
|
77
|
+
expandableComponent: React.ReactNode | JSX.Element;
|
|
78
|
+
}
|
|
79
|
+
export interface TablePropsType {
|
|
80
|
+
headers: Array<TableHeaderCellType>;
|
|
81
|
+
rows: Array<TableRowType>;
|
|
82
|
+
defaultSortIndex?: number;
|
|
83
|
+
hasExpandableRows?: boolean;
|
|
84
|
+
headerTopPosition?: number;
|
|
85
|
+
}
|
|
86
|
+
export type TableSortStateType = {
|
|
87
|
+
index: number;
|
|
88
|
+
order: SortOrderEnum;
|
|
89
|
+
};
|
|
90
|
+
export interface InfoCardPropsType {
|
|
91
|
+
entities: SegmentedBarChartProps['entities'];
|
|
92
|
+
lastScanTimeString?: string;
|
|
93
|
+
scanToolId?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface StatusType {
|
|
96
|
+
status: 'Completed' | 'Running' | 'Failed' | 'Progressing';
|
|
97
|
+
StartedOn: string;
|
|
98
|
+
scanToolName: 'TRIVY';
|
|
99
|
+
}
|
|
100
|
+
export type DetailViewDataType = {
|
|
101
|
+
titlePrefix: string;
|
|
102
|
+
title: string;
|
|
103
|
+
status: StatusType['status'];
|
|
104
|
+
} & TablePropsType & InfoCardPropsType;
|
|
105
|
+
export type SecurityModalStateType = {
|
|
106
|
+
category: (typeof CATEGORIES)[keyof typeof CATEGORIES];
|
|
107
|
+
subCategory: (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
|
|
108
|
+
detailViewData: DetailViewDataType[];
|
|
109
|
+
};
|
|
110
|
+
export interface SidebarPropsType extends Pick<SecurityModalBaseProps, 'isExternalCI'> {
|
|
111
|
+
isHelmApp: boolean;
|
|
112
|
+
modalState: SecurityModalStateType;
|
|
113
|
+
setModalState: React.Dispatch<React.SetStateAction<SecurityModalStateType>>;
|
|
114
|
+
}
|
|
115
|
+
export declare enum SeveritiesDTO {
|
|
116
|
+
CRITICAL = "CRITICAL",
|
|
117
|
+
HIGH = "HIGH",
|
|
118
|
+
MEDIUM = "MEDIUM",
|
|
119
|
+
LOW = "LOW",
|
|
120
|
+
UNKNOWN = "UNKNOWN",
|
|
121
|
+
FAILURES = "fail",
|
|
122
|
+
SUCCESSES = "success",
|
|
123
|
+
EXCEPTIONS = "exceptions"
|
|
124
|
+
}
|
|
125
|
+
type Summary<T extends 'severities' | 'status'> = Record<T, Partial<Record<SeveritiesDTO, number>>>;
|
|
126
|
+
type GenericGroupType<T> = {
|
|
127
|
+
list: T[];
|
|
128
|
+
};
|
|
129
|
+
type GenericGroupTypeWithSummary<T> = {
|
|
130
|
+
summary: Summary<'severities'>;
|
|
131
|
+
} & GenericGroupType<T>;
|
|
132
|
+
type GenericGroupTypeWithMisConfSummary<T> = {
|
|
133
|
+
misConfSummary: Summary<'status'>;
|
|
134
|
+
} & GenericGroupType<T>;
|
|
135
|
+
export interface CodeScanVulnerabilityType {
|
|
136
|
+
cveId: string;
|
|
137
|
+
severity: SeveritiesDTO;
|
|
138
|
+
package: string;
|
|
139
|
+
currentVersion: string;
|
|
140
|
+
fixedInVersion: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ImageScanVulnerabilityType extends CodeScanVulnerabilityType {
|
|
143
|
+
target?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface ImageScanVulnerabilityListType extends StatusType {
|
|
146
|
+
image: string;
|
|
147
|
+
summary: Summary<'severities'>;
|
|
148
|
+
list: ImageScanVulnerabilityType[];
|
|
149
|
+
}
|
|
150
|
+
export interface CodeScanLicenseType {
|
|
151
|
+
classification: string;
|
|
152
|
+
severity: string;
|
|
153
|
+
license: string;
|
|
154
|
+
package: string;
|
|
155
|
+
source: string;
|
|
156
|
+
}
|
|
157
|
+
export interface ImageScanLicenseListType extends StatusType {
|
|
158
|
+
image: string;
|
|
159
|
+
summary: Summary<'severities'>;
|
|
160
|
+
list: CodeScanLicenseType[];
|
|
161
|
+
}
|
|
162
|
+
export type ImageScan = {
|
|
163
|
+
[SUB_CATEGORIES.VULNERABILITIES]: GenericGroupTypeWithSummary<ImageScanVulnerabilityListType>;
|
|
164
|
+
[SUB_CATEGORIES.LICENSE]: GenericGroupTypeWithSummary<ImageScanLicenseListType>;
|
|
165
|
+
};
|
|
166
|
+
export interface Line {
|
|
167
|
+
number: number;
|
|
168
|
+
content: string;
|
|
169
|
+
isCause: boolean;
|
|
170
|
+
truncated: boolean;
|
|
171
|
+
}
|
|
172
|
+
export interface CauseMetadata {
|
|
173
|
+
startLine: number;
|
|
174
|
+
EndLine: number;
|
|
175
|
+
lines?: Line[];
|
|
176
|
+
}
|
|
177
|
+
export interface CodeScanMisconfigurationsDetailListType {
|
|
178
|
+
id: string;
|
|
179
|
+
title: string;
|
|
180
|
+
message: string;
|
|
181
|
+
resolution: string;
|
|
182
|
+
status: string;
|
|
183
|
+
severity: string;
|
|
184
|
+
causeMetadata: CauseMetadata;
|
|
185
|
+
}
|
|
186
|
+
export interface CodeScanMisconfigurationsListType {
|
|
187
|
+
filePath: string;
|
|
188
|
+
link: string;
|
|
189
|
+
type: string;
|
|
190
|
+
misConfSummary: Summary<'status'>;
|
|
191
|
+
summary: Summary<'severities'>;
|
|
192
|
+
list: CodeScanMisconfigurationsDetailListType[];
|
|
193
|
+
}
|
|
194
|
+
export interface CodeScanExposedSecretsDetailListType {
|
|
195
|
+
severity: string;
|
|
196
|
+
ruleId: string;
|
|
197
|
+
category: string;
|
|
198
|
+
startLine: number;
|
|
199
|
+
EndLine: number;
|
|
200
|
+
title: string;
|
|
201
|
+
lines: Line[];
|
|
202
|
+
}
|
|
203
|
+
export interface CodeScanExposedSecretsListType {
|
|
204
|
+
filePath: string;
|
|
205
|
+
link: string;
|
|
206
|
+
summary: Summary<'severities'>;
|
|
207
|
+
list: CodeScanExposedSecretsDetailListType[];
|
|
208
|
+
}
|
|
209
|
+
export type CodeScan = {
|
|
210
|
+
[SUB_CATEGORIES.VULNERABILITIES]: GenericGroupTypeWithSummary<CodeScanVulnerabilityType>;
|
|
211
|
+
[SUB_CATEGORIES.LICENSE]: GenericGroupTypeWithSummary<CodeScanLicenseType>;
|
|
212
|
+
[SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
|
|
213
|
+
[SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
|
|
214
|
+
} & StatusType;
|
|
215
|
+
export type KubernetesManifest = {
|
|
216
|
+
[SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
|
|
217
|
+
[SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
|
|
218
|
+
} & StatusType;
|
|
219
|
+
export type ApiResponseResultType = {
|
|
220
|
+
scanned: boolean;
|
|
221
|
+
[CATEGORIES.IMAGE_SCAN]: ImageScan;
|
|
222
|
+
[CATEGORIES.CODE_SCAN]: CodeScan;
|
|
223
|
+
[CATEGORIES.KUBERNETES_MANIFEST]: KubernetesManifest;
|
|
224
|
+
};
|
|
225
|
+
export interface IndexedTextDisplayPropsType {
|
|
226
|
+
title: string;
|
|
227
|
+
lines: Line[];
|
|
228
|
+
link: string;
|
|
229
|
+
}
|
|
230
|
+
export type SidebarDataChildType = {
|
|
231
|
+
label: string;
|
|
232
|
+
value: {
|
|
233
|
+
category: (typeof CATEGORIES)[keyof typeof CATEGORIES];
|
|
234
|
+
subCategory: (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
export type SidebarDataType = {
|
|
238
|
+
label: string;
|
|
239
|
+
isExpanded: boolean;
|
|
240
|
+
children: NonNullable<SidebarDataChildType[]>;
|
|
241
|
+
hideInHelmApp?: boolean;
|
|
242
|
+
};
|
|
243
|
+
export type EmptyStateType = Pick<GenericEmptyStateType, 'image' | 'SvgImage' | 'subTitle' | 'title' | 'children'>;
|
|
244
|
+
export declare const VulnerabilityState: {
|
|
245
|
+
readonly [-1]: "Failed";
|
|
246
|
+
readonly 0: "Progressing";
|
|
247
|
+
readonly 1: "Completed";
|
|
248
|
+
};
|
|
249
|
+
export interface ImageVulnerabilityType {
|
|
250
|
+
image: string;
|
|
251
|
+
state: keyof typeof VulnerabilityState;
|
|
252
|
+
error?: string;
|
|
253
|
+
scanResult: LastExecutionResultType | null;
|
|
254
|
+
}
|
|
255
|
+
export interface VulnerabilityCountType {
|
|
256
|
+
unknownVulnerabilitiesCount: number;
|
|
257
|
+
lowVulnerabilitiesCount: number;
|
|
258
|
+
mediumVulnerabilitiesCount: number;
|
|
259
|
+
highVulnerabilitiesCount: number;
|
|
260
|
+
criticalVulnerabilitiesCount: number;
|
|
261
|
+
}
|
|
262
|
+
export interface GetResourceScanDetailsResponseType extends VulnerabilityCountType {
|
|
263
|
+
imageVulnerabilities: ImageVulnerabilityType[];
|
|
264
|
+
}
|
|
265
|
+
export interface OpenDetailViewButtonProps {
|
|
266
|
+
detailViewData: DetailViewDataType;
|
|
267
|
+
setDetailViewData: (detailViewData: DetailViewDataType) => void;
|
|
268
|
+
}
|
|
269
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ApiResponseResultType, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
|
|
2
|
+
import { SEVERITIES } from './constants';
|
|
3
|
+
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
|
4
|
+
color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
|
|
5
|
+
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
|
6
|
+
value: number;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
|
9
|
+
export declare const getSeverityWeight: (severity: SeveritiesDTO) => number;
|
|
10
|
+
export declare const compareSeverity: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
|
|
11
|
+
export declare const getSecurityScanSeveritiesCount: (data: ApiResponseResultType) => {
|
|
12
|
+
critical: number;
|
|
13
|
+
high: number;
|
|
14
|
+
medium: number;
|
|
15
|
+
low: number;
|
|
16
|
+
unknown: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const compareSeverities: (a: Record<SeveritiesDTO, number>, b: Record<SeveritiesDTO, number>) => number;
|
|
19
|
+
export declare const getScanCompletedEmptyState: (scanToolId: number) => {
|
|
20
|
+
SvgImage: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
|
21
|
+
title: string;
|
|
22
|
+
children: JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export declare const compareStringAndObject: (a: string | object, b: string | object) => number;
|
|
25
|
+
export declare const parseExecutionDetailResponse: (scanResult: any) => ApiResponseResultType;
|
|
26
|
+
export declare const parseGetResourceScanDetailsResponse: (data: GetResourceScanDetailsResponseType) => ApiResponseResultType;
|
|
27
|
+
export declare const getTotalVulnerabilityCount: (scannedResult: ImageVulnerabilityType[]) => VulnerabilityCountType;
|
|
28
|
+
export declare const groupByTarget: (list: ImageScanVulnerabilityType[]) => {
|
|
29
|
+
source: string;
|
|
30
|
+
list: ImageScanVulnerabilityType[];
|
|
31
|
+
summary: {
|
|
32
|
+
severities: Partial<Record<SeveritiesDTO, number>>;
|
|
33
|
+
};
|
|
34
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SecuritySummaryCard } from './SecuritySummaryCard';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SeverityCount } from '../../../types';
|
|
2
|
+
import { AppDetailsPayload, ExecutionDetailsPayload } from '../SecurityModal';
|
|
3
|
+
interface ExecutionDetailsPayloadType {
|
|
4
|
+
executionDetailsPayload: ExecutionDetailsPayload;
|
|
5
|
+
appDetailsPayload?: never;
|
|
6
|
+
}
|
|
7
|
+
interface AppDetailsPayloadType {
|
|
8
|
+
executionDetailsPayload?: never;
|
|
9
|
+
appDetailsPayload: AppDetailsPayload;
|
|
10
|
+
}
|
|
11
|
+
export type SecuritySummaryCardProps = {
|
|
12
|
+
severityCount: SeverityCount;
|
|
13
|
+
scanToolId: number;
|
|
14
|
+
rootClassName?: string;
|
|
15
|
+
} & (ExecutionDetailsPayloadType | AppDetailsPayloadType);
|
|
16
|
+
export {};
|
package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/Vulnerabilities.d.ts
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VulnerabilitiesProps } from './types';
|
|
2
|
-
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, }: VulnerabilitiesProps) => JSX.Element;
|
|
2
|
+
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, isScanV2Enabled, }: VulnerabilitiesProps) => JSX.Element;
|
|
3
3
|
export default Vulnerabilities;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LastExecutionResponseType } from '
|
|
1
|
+
import { LastExecutionResponseType } from '../../../types';
|
|
2
2
|
export declare function getLastExecutionByArtifactAppEnv(artifactId: string | number, appId: number | string, envId: number | string): Promise<LastExecutionResponseType>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { MaterialSecurityInfoType } from '
|
|
1
|
+
import { MaterialSecurityInfoType } from '../../../types';
|
|
2
2
|
export interface VulnerabilitiesProps extends MaterialSecurityInfoType {
|
|
3
3
|
artifactId: number;
|
|
4
4
|
applicationId: number;
|
|
5
5
|
environmentId: number;
|
|
6
6
|
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
|
7
|
+
isScanV2Enabled: boolean;
|
|
7
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LastExecutionResponseType, LastExecutionResultType } from '
|
|
1
|
+
import { LastExecutionResponseType, LastExecutionResultType } from '../../../types';
|
|
2
2
|
export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
|
|
3
3
|
export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
|
|
4
4
|
export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
|
|
@@ -5,7 +5,6 @@ export * from './ImageCard';
|
|
|
5
5
|
export * from './ImageCardAccordion';
|
|
6
6
|
export * from './ExcludedImageNode';
|
|
7
7
|
export * from './ScannedByToolModal';
|
|
8
|
-
export * from './Vulnerabilities';
|
|
9
8
|
export * from './FilterChips';
|
|
10
9
|
export * from './ActivityIndicator';
|
|
11
10
|
export * from './GenericSectionErrorState';
|
|
@@ -40,4 +39,5 @@ export * from './TabGroup';
|
|
|
40
39
|
export * from './EditImageFormField';
|
|
41
40
|
export * from './Collapse';
|
|
42
41
|
export * from './FilterButton';
|
|
42
|
+
export * from './Security';
|
|
43
43
|
export * from './Button';
|
|
@@ -197,11 +197,6 @@ export interface TemplateListDTO {
|
|
|
197
197
|
status?: string;
|
|
198
198
|
pipelineId?: number;
|
|
199
199
|
}
|
|
200
|
-
export interface ManifestTemplateDTO {
|
|
201
|
-
data: string;
|
|
202
|
-
resolvedData: string;
|
|
203
|
-
variableSnapshot: null;
|
|
204
|
-
}
|
|
205
200
|
export declare enum DraftState {
|
|
206
201
|
Init = 1,
|
|
207
202
|
Discarded = 2,
|
|
@@ -211,7 +206,6 @@ export declare enum DraftState {
|
|
|
211
206
|
export declare enum EnvResourceType {
|
|
212
207
|
ConfigMap = "configmap",
|
|
213
208
|
Secret = "secrets",
|
|
214
|
-
DeploymentTemplate = "deployment-template"
|
|
215
|
-
Manifest = "manifest"
|
|
209
|
+
DeploymentTemplate = "deployment-template"
|
|
216
210
|
}
|
|
217
211
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -413,6 +413,7 @@ export interface LastExecutionResultType {
|
|
|
413
413
|
scanned?: boolean;
|
|
414
414
|
scanEnabled?: boolean;
|
|
415
415
|
scanToolId?: number;
|
|
416
|
+
imageScanDeployInfoId?: number;
|
|
416
417
|
}
|
|
417
418
|
export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
|
|
418
419
|
}
|