Skip to content

Commit

Permalink
fix(2187): scan to include deepfence system
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-deepfence committed Apr 25, 2024
1 parent 4754397 commit 4c5be2e
Show file tree
Hide file tree
Showing 13 changed files with 223 additions and 6 deletions.
24 changes: 21 additions & 3 deletions deepfence_frontend/apps/dashboard/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -13095,6 +13095,7 @@
"nullable": true
},
"cron_expr": { "type": "string" },
"deepfence_system_scan": { "type": "boolean" },
"description": { "type": "string" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
Expand Down Expand Up @@ -13676,6 +13677,7 @@
"items": { "type": "string" },
"nullable": true
},
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -13724,7 +13726,11 @@
"secret_latest_scan_id",
"malwares_count",
"malware_scan_status",
"malware_latest_scan_id"
"malware_latest_scan_id",
"kubernetes_cluster_name",
"kubernetes_cluster_id",
"kubernetes_namespace",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -13746,6 +13752,10 @@
},
"host_name": { "type": "string" },
"image": { "$ref": "#/components/schemas/ModelContainerImage" },
"is_deepfence_system": { "type": "boolean" },
"kubernetes_cluster_id": { "type": "string" },
"kubernetes_cluster_name": { "type": "string" },
"kubernetes_namespace": { "type": "string" },
"malware_latest_scan_id": { "type": "string" },
"malware_scan_status": { "type": "string" },
"malwares_count": { "type": "integer" },
Expand Down Expand Up @@ -13788,7 +13798,8 @@
"malwares_count",
"malware_scan_status",
"malware_latest_scan_id",
"containers"
"containers",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -13809,6 +13820,7 @@
},
"docker_image_virtual_size": { "type": "string" },
"image_node_id": { "type": "string" },
"is_deepfence_system": { "type": "boolean" },
"malware_latest_scan_id": { "type": "string" },
"malware_scan_status": { "type": "string" },
"malwares_count": { "type": "integer" },
Expand Down Expand Up @@ -14496,6 +14508,7 @@
"required": ["node_ids", "filters"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -14582,7 +14595,8 @@
"kubernetes_created",
"malware_scan_status",
"secret_scan_status",
"vulnerability_scan_status"
"vulnerability_scan_status",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -14592,6 +14606,7 @@
"nullable": true
},
"host_name": { "type": "string" },
"is_deepfence_system": { "type": "boolean" },
"kubernetes_cluster_id": { "type": "string" },
"kubernetes_cluster_name": { "type": "string" },
"kubernetes_created": { "type": "string" },
Expand Down Expand Up @@ -15206,6 +15221,7 @@
"required": ["node_ids", "filters"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -15550,6 +15566,7 @@
"required": ["node_ids", "filters", "scan_config"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -15634,6 +15651,7 @@
"interface_ips": { "type": "array", "items": { "type": "string" } },
"interface_names": { "type": "array", "items": { "type": "string" } },
"is_console_vm": { "type": "boolean" },
"is_deepfence_system": { "type": "boolean" },
"kernel_id": { "type": "string" },
"kernel_version": { "type": "string" },
"kubernetes_cluster_id": { "type": "string" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export interface ModelAddScheduledTaskRequest {
* @memberof ModelAddScheduledTaskRequest
*/
cron_expr?: string;
/**
*
* @type {boolean}
* @memberof ModelAddScheduledTaskRequest
*/
deepfence_system_scan?: boolean;
/**
*
* @type {string}
Expand Down Expand Up @@ -129,6 +135,7 @@ export function ModelAddScheduledTaskRequestFromJSONTyped(json: any, ignoreDiscr
'action': json['action'],
'benchmark_types': json['benchmark_types'],
'cron_expr': !exists(json, 'cron_expr') ? undefined : json['cron_expr'],
'deepfence_system_scan': !exists(json, 'deepfence_system_scan') ? undefined : json['deepfence_system_scan'],
'description': !exists(json, 'description') ? undefined : json['description'],
'filters': ModelScanFilterFromJSON(json['filters']),
'is_priority': !exists(json, 'is_priority') ? undefined : json['is_priority'],
Expand All @@ -149,6 +156,7 @@ export function ModelAddScheduledTaskRequestToJSON(value?: ModelAddScheduledTask
'action': value.action,
'benchmark_types': value.benchmark_types,
'cron_expr': value.cron_expr,
'deepfence_system_scan': value.deepfence_system_scan,
'description': value.description,
'filters': ModelScanFilterToJSON(value.filters),
'is_priority': value.is_priority,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export interface ModelComplianceScanTriggerReq {
* @memberof ModelComplianceScanTriggerReq
*/
benchmark_types: Array<string> | null;
/**
*
* @type {boolean}
* @memberof ModelComplianceScanTriggerReq
*/
deepfence_system_scan?: boolean;
/**
*
* @type {ModelScanFilter}
Expand Down Expand Up @@ -81,6 +87,7 @@ export function ModelComplianceScanTriggerReqFromJSONTyped(json: any, ignoreDisc
return {

'benchmark_types': json['benchmark_types'],
'deepfence_system_scan': !exists(json, 'deepfence_system_scan') ? undefined : json['deepfence_system_scan'],
'filters': ModelScanFilterFromJSON(json['filters']),
'is_priority': !exists(json, 'is_priority') ? undefined : json['is_priority'],
'node_ids': (json['node_ids'] === null ? null : (json['node_ids'] as Array<any>).map(ModelNodeIdentifierFromJSON)),
Expand All @@ -97,6 +104,7 @@ export function ModelComplianceScanTriggerReqToJSON(value?: ModelComplianceScanT
return {

'benchmark_types': value.benchmark_types,
'deepfence_system_scan': value.deepfence_system_scan,
'filters': ModelScanFilterToJSON(value.filters),
'is_priority': value.is_priority,
'node_ids': (value.node_ids === null ? null : (value.node_ids as Array<any>).map(ModelNodeIdentifierToJSON)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,30 @@ export interface ModelContainer {
* @memberof ModelContainer
*/
image: ModelContainerImage;
/**
*
* @type {boolean}
* @memberof ModelContainer
*/
is_deepfence_system: boolean;
/**
*
* @type {string}
* @memberof ModelContainer
*/
kubernetes_cluster_id: string;
/**
*
* @type {string}
* @memberof ModelContainer
*/
kubernetes_cluster_name: string;
/**
*
* @type {string}
* @memberof ModelContainer
*/
kubernetes_namespace: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -227,6 +251,10 @@ export function instanceOfModelContainer(value: object): boolean {
isInstance = isInstance && "docker_labels" in value;
isInstance = isInstance && "host_name" in value;
isInstance = isInstance && "image" in value;
isInstance = isInstance && "is_deepfence_system" in value;
isInstance = isInstance && "kubernetes_cluster_id" in value;
isInstance = isInstance && "kubernetes_cluster_name" in value;
isInstance = isInstance && "kubernetes_namespace" in value;
isInstance = isInstance && "malware_latest_scan_id" in value;
isInstance = isInstance && "malware_scan_status" in value;
isInstance = isInstance && "malwares_count" in value;
Expand Down Expand Up @@ -270,6 +298,10 @@ export function ModelContainerFromJSONTyped(json: any, ignoreDiscriminator: bool
'docker_labels': json['docker_labels'],
'host_name': json['host_name'],
'image': ModelContainerImageFromJSON(json['image']),
'is_deepfence_system': json['is_deepfence_system'],
'kubernetes_cluster_id': json['kubernetes_cluster_id'],
'kubernetes_cluster_name': json['kubernetes_cluster_name'],
'kubernetes_namespace': json['kubernetes_namespace'],
'malware_latest_scan_id': json['malware_latest_scan_id'],
'malware_scan_status': json['malware_scan_status'],
'malwares_count': json['malwares_count'],
Expand Down Expand Up @@ -311,6 +343,10 @@ export function ModelContainerToJSON(value?: ModelContainer | null): any {
'docker_labels': value.docker_labels,
'host_name': value.host_name,
'image': ModelContainerImageToJSON(value.image),
'is_deepfence_system': value.is_deepfence_system,
'kubernetes_cluster_id': value.kubernetes_cluster_id,
'kubernetes_cluster_name': value.kubernetes_cluster_name,
'kubernetes_namespace': value.kubernetes_namespace,
'malware_latest_scan_id': value.malware_latest_scan_id,
'malware_scan_status': value.malware_scan_status,
'malwares_count': value.malwares_count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export interface ModelContainerImage {
* @memberof ModelContainerImage
*/
image_node_id: string;
/**
*
* @type {boolean}
* @memberof ModelContainerImage
*/
is_deepfence_system: boolean;
/**
*
* @type {string}
Expand Down Expand Up @@ -168,6 +174,7 @@ export function instanceOfModelContainerImage(value: object): boolean {
isInstance = isInstance && "docker_image_tag_list" in value;
isInstance = isInstance && "docker_image_virtual_size" in value;
isInstance = isInstance && "image_node_id" in value;
isInstance = isInstance && "is_deepfence_system" in value;
isInstance = isInstance && "malware_latest_scan_id" in value;
isInstance = isInstance && "malware_scan_status" in value;
isInstance = isInstance && "malwares_count" in value;
Expand Down Expand Up @@ -202,6 +209,7 @@ export function ModelContainerImageFromJSONTyped(json: any, ignoreDiscriminator:
'docker_image_tag_list': json['docker_image_tag_list'],
'docker_image_virtual_size': json['docker_image_virtual_size'],
'image_node_id': json['image_node_id'],
'is_deepfence_system': json['is_deepfence_system'],
'malware_latest_scan_id': json['malware_latest_scan_id'],
'malware_scan_status': json['malware_scan_status'],
'malwares_count': json['malwares_count'],
Expand Down Expand Up @@ -235,6 +243,7 @@ export function ModelContainerImageToJSON(value?: ModelContainerImage | null): a
'docker_image_tag_list': value.docker_image_tag_list,
'docker_image_virtual_size': value.docker_image_virtual_size,
'image_node_id': value.image_node_id,
'is_deepfence_system': value.is_deepfence_system,
'malware_latest_scan_id': value.malware_latest_scan_id,
'malware_scan_status': value.malware_scan_status,
'malwares_count': value.malwares_count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ import {
* @interface ModelMalwareScanTriggerReq
*/
export interface ModelMalwareScanTriggerReq {
/**
*
* @type {boolean}
* @memberof ModelMalwareScanTriggerReq
*/
deepfence_system_scan?: boolean;
/**
*
* @type {ModelScanFilter}
Expand Down Expand Up @@ -73,6 +79,7 @@ export function ModelMalwareScanTriggerReqFromJSONTyped(json: any, ignoreDiscrim
}
return {

'deepfence_system_scan': !exists(json, 'deepfence_system_scan') ? undefined : json['deepfence_system_scan'],
'filters': ModelScanFilterFromJSON(json['filters']),
'is_priority': !exists(json, 'is_priority') ? undefined : json['is_priority'],
'node_ids': (json['node_ids'] === null ? null : (json['node_ids'] as Array<any>).map(ModelNodeIdentifierFromJSON)),
Expand All @@ -88,6 +95,7 @@ export function ModelMalwareScanTriggerReqToJSON(value?: ModelMalwareScanTrigger
}
return {

'deepfence_system_scan': value.deepfence_system_scan,
'filters': ModelScanFilterToJSON(value.filters),
'is_priority': value.is_priority,
'node_ids': (value.node_ids === null ? null : (value.node_ids as Array<any>).map(ModelNodeIdentifierToJSON)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export interface ModelPod {
* @memberof ModelPod
*/
host_name: string;
/**
*
* @type {boolean}
* @memberof ModelPod
*/
is_deepfence_system: boolean;
/**
*
* @type {string}
Expand Down Expand Up @@ -143,6 +149,7 @@ export function instanceOfModelPod(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "containers" in value;
isInstance = isInstance && "host_name" in value;
isInstance = isInstance && "is_deepfence_system" in value;
isInstance = isInstance && "kubernetes_cluster_id" in value;
isInstance = isInstance && "kubernetes_cluster_name" in value;
isInstance = isInstance && "kubernetes_created" in value;
Expand Down Expand Up @@ -174,6 +181,7 @@ export function ModelPodFromJSONTyped(json: any, ignoreDiscriminator: boolean):

'containers': (json['containers'] === null ? null : (json['containers'] as Array<any>).map(ModelContainerFromJSON)),
'host_name': json['host_name'],
'is_deepfence_system': json['is_deepfence_system'],
'kubernetes_cluster_id': json['kubernetes_cluster_id'],
'kubernetes_cluster_name': json['kubernetes_cluster_name'],
'kubernetes_created': json['kubernetes_created'],
Expand Down Expand Up @@ -203,6 +211,7 @@ export function ModelPodToJSON(value?: ModelPod | null): any {

'containers': (value.containers === null ? null : (value.containers as Array<any>).map(ModelContainerToJSON)),
'host_name': value.host_name,
'is_deepfence_system': value.is_deepfence_system,
'kubernetes_cluster_id': value.kubernetes_cluster_id,
'kubernetes_cluster_name': value.kubernetes_cluster_name,
'kubernetes_created': value.kubernetes_created,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ import {
* @interface ModelSecretScanTriggerReq
*/
export interface ModelSecretScanTriggerReq {
/**
*
* @type {boolean}
* @memberof ModelSecretScanTriggerReq
*/
deepfence_system_scan?: boolean;
/**
*
* @type {ModelScanFilter}
Expand Down Expand Up @@ -73,6 +79,7 @@ export function ModelSecretScanTriggerReqFromJSONTyped(json: any, ignoreDiscrimi
}
return {

'deepfence_system_scan': !exists(json, 'deepfence_system_scan') ? undefined : json['deepfence_system_scan'],
'filters': ModelScanFilterFromJSON(json['filters']),
'is_priority': !exists(json, 'is_priority') ? undefined : json['is_priority'],
'node_ids': (json['node_ids'] === null ? null : (json['node_ids'] as Array<any>).map(ModelNodeIdentifierFromJSON)),
Expand All @@ -88,6 +95,7 @@ export function ModelSecretScanTriggerReqToJSON(value?: ModelSecretScanTriggerRe
}
return {

'deepfence_system_scan': value.deepfence_system_scan,
'filters': ModelScanFilterToJSON(value.filters),
'is_priority': value.is_priority,
'node_ids': (value.node_ids === null ? null : (value.node_ids as Array<any>).map(ModelNodeIdentifierToJSON)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ import {
* @interface ModelVulnerabilityScanTriggerReq
*/
export interface ModelVulnerabilityScanTriggerReq {
/**
*
* @type {boolean}
* @memberof ModelVulnerabilityScanTriggerReq
*/
deepfence_system_scan?: boolean;
/**
*
* @type {ModelScanFilter}
Expand Down Expand Up @@ -86,6 +92,7 @@ export function ModelVulnerabilityScanTriggerReqFromJSONTyped(json: any, ignoreD
}
return {

'deepfence_system_scan': !exists(json, 'deepfence_system_scan') ? undefined : json['deepfence_system_scan'],
'filters': ModelScanFilterFromJSON(json['filters']),
'is_priority': !exists(json, 'is_priority') ? undefined : json['is_priority'],
'node_ids': (json['node_ids'] === null ? null : (json['node_ids'] as Array<any>).map(ModelNodeIdentifierFromJSON)),
Expand All @@ -102,6 +109,7 @@ export function ModelVulnerabilityScanTriggerReqToJSON(value?: ModelVulnerabilit
}
return {

'deepfence_system_scan': value.deepfence_system_scan,
'filters': ModelScanFilterToJSON(value.filters),
'is_priority': value.is_priority,
'node_ids': (value.node_ids === null ? null : (value.node_ids as Array<any>).map(ModelNodeIdentifierToJSON)),
Expand Down
Loading

0 comments on commit 4c5be2e

Please sign in to comment.