-
Notifications
You must be signed in to change notification settings - Fork 485
/
ImageScanService.go
558 lines (522 loc) · 21.8 KB
/
ImageScanService.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
/*
* Copyright (c) 2020 Devtron Labs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package security
import (
"github.com/devtron-labs/devtron/internal/sql/repository"
"github.com/devtron-labs/devtron/internal/sql/repository/appstore"
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
"github.com/devtron-labs/devtron/internal/sql/repository/security"
"github.com/devtron-labs/devtron/internal/sql/repository/team"
"github.com/devtron-labs/devtron/pkg/cluster"
"github.com/devtron-labs/devtron/pkg/user"
"github.com/go-pg/pg"
"go.uber.org/zap"
"time"
)
type ImageScanService interface {
FetchAllDeployInfo(request *ImageScanRequest) ([]*security.ImageScanDeployInfo, error)
FetchScanExecutionListing(request *ImageScanRequest, ids []int) (*ImageScanHistoryListingResponse, error)
FetchExecutionDetailResult(request *ImageScanRequest) (*ImageScanExecutionDetail, error)
FetchMinScanResultByAppIdAndEnvId(request *ImageScanRequest) (*ImageScanExecutionDetail, error)
VulnerabilityExposure(request *security.VulnerabilityRequest) (*security.VulnerabilityExposureListingResponse, error)
}
type ImageScanServiceImpl struct {
Logger *zap.SugaredLogger
scanHistoryRepository security.ImageScanHistoryRepository
scanResultRepository security.ImageScanResultRepository
scanObjectMetaRepository security.ImageScanObjectMetaRepository
cveStoreRepository security.CveStoreRepository
imageScanDeployInfoRepository security.ImageScanDeployInfoRepository
userService user.UserService
teamRepository team.TeamRepository
appRepository pipelineConfig.AppRepository
envService cluster.EnvironmentService
ciArtifactRepository repository.CiArtifactRepository
policyService PolicyService
pipelineRepository pipelineConfig.PipelineRepository
installedAppRepository appstore.InstalledAppRepository
ciPipelineRepository pipelineConfig.CiPipelineRepository
}
type ImageScanRequest struct {
ScanExecutionId int `json:"ScanExecutionId"`
ImageScanDeployInfoId int `json:"imageScanDeployInfo"`
AppId int `json:"appId"`
EnvId int `json:"envId"`
ObjectId int `json:"objectId"`
ArtifactId int `json:"artifactId"`
Image string `json:"image"`
security.ImageScanFilter
}
type ImageScanHistoryListingResponse struct {
Offset int `json:"offset"`
Size int `json:"size"`
Total int `json:"total"`
ImageScanHistoryResponse []*ImageScanHistoryResponse `json:"scanList"`
}
type ImageScanHistoryResponse struct {
ImageScanDeployInfoId int `json:"imageScanDeployInfoId"`
AppId int `json:"appId"`
EnvId int `json:"envId"`
Name string `json:"name"`
Type string `json:"type"`
Environment string `json:"environment"`
LastChecked *time.Time `json:"lastChecked"`
Image string `json:"image,omitempty"`
SeverityCount *SeverityCount `json:"severityCount,omitempty"`
}
type ImageScanExecutionDetail struct {
ImageScanDeployInfoId int `json:"imageScanDeployInfoId"`
AppId int `json:"appId,omitempty"`
EnvId int `json:"envId,omitempty"`
AppName string `json:"appName,omitempty"`
EnvName string `json:"envName,omitempty"`
ArtifactId int `json:"artifactId,omitempty"`
Image string `json:"image,omitempty"`
PodName string `json:"podName,omitempty"`
ReplicaSet string `json:"replicaSet,omitempty"`
Vulnerabilities []*Vulnerabilities `json:"vulnerabilities,omitempty"`
SeverityCount *SeverityCount `json:"severityCount,omitempty"`
ExecutionTime time.Time `json:"executionTime,omitempty"`
ScanEnabled bool `json:"scanEnabled,notnull"`
Scanned bool `json:"scanned,notnull"`
ObjectType string `json:"objectType,notnull"`
}
type Vulnerabilities struct {
CVEName string `json:"cveName"`
Severity string `json:"severity"`
Package string `json:"package,omitempty"`
CVersion string `json:"currentVersion"`
FVersion string `json:"fixedVersion"`
Permission string `json:"permission"`
}
type SeverityCount struct {
High int `json:"high"`
Moderate int `json:"moderate"`
Low int `json:"low"`
}
func NewImageScanServiceImpl(Logger *zap.SugaredLogger, scanHistoryRepository security.ImageScanHistoryRepository,
scanResultRepository security.ImageScanResultRepository, scanObjectMetaRepository security.ImageScanObjectMetaRepository,
cveStoreRepository security.CveStoreRepository, imageScanDeployInfoRepository security.ImageScanDeployInfoRepository,
userService user.UserService, teamRepository team.TeamRepository,
appRepository pipelineConfig.AppRepository,
envService cluster.EnvironmentService, ciArtifactRepository repository.CiArtifactRepository, policyService PolicyService,
pipelineRepository pipelineConfig.PipelineRepository,
installedAppRepository appstore.InstalledAppRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository) *ImageScanServiceImpl {
return &ImageScanServiceImpl{Logger: Logger, scanHistoryRepository: scanHistoryRepository, scanResultRepository: scanResultRepository,
scanObjectMetaRepository: scanObjectMetaRepository, cveStoreRepository: cveStoreRepository,
imageScanDeployInfoRepository: imageScanDeployInfoRepository,
userService: userService,
teamRepository: teamRepository,
appRepository: appRepository,
envService: envService,
ciArtifactRepository: ciArtifactRepository,
policyService: policyService,
pipelineRepository: pipelineRepository,
installedAppRepository: installedAppRepository,
ciPipelineRepository: ciPipelineRepository,
}
}
func (impl ImageScanServiceImpl) FetchAllDeployInfo(request *ImageScanRequest) ([]*security.ImageScanDeployInfo, error) {
deployedList, err := impl.imageScanDeployInfoRepository.FindAll()
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
return deployedList, nil
}
func (impl ImageScanServiceImpl) FetchScanExecutionListing(request *ImageScanRequest, deployInfoIds []int) (*ImageScanHistoryListingResponse, error) {
size := request.Size
request.Size = 0
groupByListCount, err := impl.imageScanDeployInfoRepository.ScanListingWithFilter(&request.ImageScanFilter, request.Size, request.Offset, deployInfoIds)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
request.Size = size
groupByList, err := impl.imageScanDeployInfoRepository.ScanListingWithFilter(&request.ImageScanFilter, request.Size, request.Offset, deployInfoIds)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
var ids []int
for _, item := range groupByList {
ids = append(ids, item.Id)
}
if len(ids) == 0 {
impl.Logger.Debugw("no image scan deploy info exists", "err", err)
responseList := make([]*ImageScanHistoryResponse, 0)
return &ImageScanHistoryListingResponse{ImageScanHistoryResponse: responseList}, nil
}
deployedList, err := impl.imageScanDeployInfoRepository.FindByIds(ids)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
groupByListMap := make(map[int]*security.ImageScanDeployInfo)
for _, item := range deployedList {
groupByListMap[item.Id] = item
}
var finalResponseList []*ImageScanHistoryResponse
for _, item := range groupByList {
imageScanHistoryResponse := &ImageScanHistoryResponse{}
var lastChecked time.Time
highCount := 0
moderateCount := 0
lowCount := 0
imageScanDeployInfo := groupByListMap[item.Id]
if imageScanDeployInfo != nil {
scanResultList, err := impl.scanResultRepository.FetchByScanExecutionIds(imageScanDeployInfo.ImageScanExecutionHistoryId)
if err != nil && err != pg.ErrNoRows {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
//return nil, err
}
if err == pg.ErrNoRows {
impl.Logger.Errorw("no scan execution data found, but has image scan deployed info", "err", err)
return nil, err
}
for _, item := range scanResultList {
lastChecked = item.ImageScanExecutionHistory.ExecutionTime
if item.CveStore.Severity == security.Critical {
highCount = highCount + 1
} else if item.CveStore.Severity == security.Moderate {
moderateCount = moderateCount + 1
} else if item.CveStore.Severity == security.Low {
lowCount = lowCount + 1
}
}
}
severityCount := &SeverityCount{
High: highCount,
Moderate: moderateCount,
Low: lowCount,
}
imageScanHistoryResponse.ImageScanDeployInfoId = item.Id
if imageScanDeployInfo != nil {
imageScanHistoryResponse.LastChecked = &lastChecked
}
imageScanHistoryResponse.SeverityCount = severityCount
if imageScanDeployInfo != nil {
imageScanHistoryResponse.EnvId = imageScanDeployInfo.EnvId
}
imageScanHistoryResponse.Environment = item.EnvironmentName
if len(request.AppName) > 0 || len(request.ObjectName) > 0 {
imageScanHistoryResponse.Name = item.ObjectName
imageScanHistoryResponse.Type = item.ObjectType
if len(request.AppName) > 0 {
imageScanHistoryResponse.AppId = item.ScanObjectMetaId
}
} else {
if item.ObjectType == security.ScanObjectType_APP || item.ObjectType == security.ScanObjectType_CHART {
app, err := impl.appRepository.FindById(item.ScanObjectMetaId)
if err != nil {
return nil, err
}
imageScanHistoryResponse.AppId = app.Id
imageScanHistoryResponse.Name = app.AppName
imageScanHistoryResponse.Type = item.ObjectType
} else if item.ObjectType == security.ScanObjectType_POD {
scanObjectMeta, err := impl.scanObjectMetaRepository.FindOne(item.ScanObjectMetaId)
if err != nil {
return nil, err
}
imageScanHistoryResponse.Name = scanObjectMeta.Name
imageScanHistoryResponse.Type = item.ObjectType
}
}
finalResponseList = append(finalResponseList, imageScanHistoryResponse)
}
finalResponse := &ImageScanHistoryListingResponse{
Offset: request.Offset,
Size: request.Size,
ImageScanHistoryResponse: finalResponseList,
Total: len(groupByListCount),
}
/*
1) fetch from image_deployment_info, group by object id and type,
2) on iteration collect image scan execution id and fetch its result and put in map
3) merge 1st result with map
*/
return finalResponse, err
}
func (impl ImageScanServiceImpl) FetchExecutionDetailResult(request *ImageScanRequest) (*ImageScanExecutionDetail, error) {
//var scanExecution *security.ImageScanExecutionHistory
var scanExecutionIds []int
var executionTime time.Time
imageScanResponse := &ImageScanExecutionDetail{}
isRegularApp := false
if request.ImageScanDeployInfoId > 0 {
// scan detail for deployed images
scanDeployInfo, err := impl.imageScanDeployInfoRepository.FindOne(request.ImageScanDeployInfoId)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
for _, id := range scanDeployInfo.ImageScanExecutionHistoryId {
scanExecutionIds = append(scanExecutionIds, id)
}
if scanDeployInfo.ObjectType == security.ScanObjectType_APP || scanDeployInfo.ObjectType == security.ScanObjectType_CHART {
request.AppId = scanDeployInfo.ScanObjectMetaId
} else if scanDeployInfo.ObjectType == security.ScanObjectType_POD {
request.ObjectId = scanDeployInfo.ScanObjectMetaId
}
request.EnvId = scanDeployInfo.EnvId
if scanDeployInfo.ObjectType == security.ScanObjectType_APP {
isRegularApp = true
}
imageScanResponse.ObjectType = scanDeployInfo.ObjectType
if !isRegularApp {
imageScanResponse.ScanEnabled = true
imageScanResponse.Scanned = true
}
} else if request.ArtifactId > 0 {
// scan detail for artifact weather it is deployed or not, used here for ci build history
ciArtifact, err := impl.ciArtifactRepository.Get(request.ArtifactId)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
scanExecution, err := impl.scanHistoryRepository.FindByImageDigest(ciArtifact.ImageDigest)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
ciPipeline, err := impl.ciPipelineRepository.FindById(ciArtifact.PipelineId)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
imageScanResponse.AppId = ciPipeline.AppId
scanExecutionIds = append(scanExecutionIds, scanExecution.Id)
executionTime = scanExecution.ExecutionTime
imageScanResponse.ScanEnabled = ciArtifact.ScanEnabled
imageScanResponse.Scanned = ciArtifact.Scanned
if ciArtifact.ScanEnabled == false {
impl.Logger.Debugw("returning without result as scan disabled for this artifact", "ciArtifact", ciArtifact)
return imageScanResponse, nil
}
imageScanResponse.ObjectType = security.ScanObjectType_APP
}
var vulnerabilities []*Vulnerabilities
var highCount, moderateCount, lowCount int
var cveStores []*security.CveStore
imageDigests := make(map[string]string)
if len(scanExecutionIds) > 0 {
//var imageScanResultFinal []*security.ImageScanExecutionResult
imageScanResult, err := impl.scanResultRepository.FetchByScanExecutionIds(scanExecutionIds)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
for _, item := range imageScanResult {
vulnerability := &Vulnerabilities{
CVEName: item.CveStore.Name,
CVersion: item.CveStore.Version,
FVersion: item.CveStore.FixedVersion,
Package: item.CveStore.Package,
Severity: item.CveStore.Severity.String(),
//Permission: "BLOCK", TODO
}
if item.CveStore.Severity == security.Critical {
highCount = highCount + 1
} else if item.CveStore.Severity == security.Moderate {
moderateCount = moderateCount + 1
} else if item.CveStore.Severity == security.Low {
lowCount = lowCount + 1
}
vulnerabilities = append(vulnerabilities, vulnerability)
cveStores = append(cveStores, &item.CveStore)
if _, ok := imageDigests[item.ImageScanExecutionHistory.ImageHash]; !ok {
imageDigests[item.ImageScanExecutionHistory.ImageHash] = item.ImageScanExecutionHistory.ImageHash
}
executionTime = item.ImageScanExecutionHistory.ExecutionTime
}
}
severityCount := &SeverityCount{
High: highCount,
Moderate: moderateCount,
Low: lowCount,
}
imageScanResponse.ImageScanDeployInfoId = request.ImageScanDeployInfoId
if vulnerabilities == nil || len(vulnerabilities) == 0 {
vulnerabilities = make([]*Vulnerabilities, 0)
}
imageScanResponse.Vulnerabilities = vulnerabilities
imageScanResponse.SeverityCount = severityCount
imageScanResponse.ExecutionTime = executionTime
// scanned enabled or not only for when we don't ask for direct artifact id
if request.ImageScanDeployInfoId > 0 && request.ArtifactId == 0 && isRegularApp {
for _, v := range imageDigests {
ciArtifact, err := impl.ciArtifactRepository.GetByImageDigest(v)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
imageScanResponse.ScanEnabled = ciArtifact.ScanEnabled
imageScanResponse.Scanned = ciArtifact.Scanned
}
}
if request.AppId > 0 && request.EnvId > 0 {
app, err := impl.appRepository.FindById(request.AppId)
if err != nil {
impl.Logger.Errorw("error while fetching env", "err", err)
return nil, err
}
imageScanResponse.AppId = request.AppId
imageScanResponse.AppName = app.AppName
env, err := impl.envService.FindById(request.EnvId)
if err != nil {
impl.Logger.Errorw("error while fetching env", "err", err)
return nil, err
}
imageScanResponse.EnvId = request.EnvId
imageScanResponse.EnvName = env.Environment
blockCveList, err := impl.policyService.GetBlockedCVEList(cveStores, env.ClusterId, env.Id, request.AppId, app.AppStore)
if err != nil {
impl.Logger.Errorw("error while fetching env", "err", err)
//return nil, err
//TODO - review @nishant
}
if blockCveList != nil {
vulnerabilityPermissionMap := make(map[string]string)
for _, cve := range blockCveList {
vulnerabilityPermissionMap[cve.Name] = "BLOCK"
}
var updatedVulnerabilities []*Vulnerabilities
for _, vulnerability := range imageScanResponse.Vulnerabilities {
if _, ok := vulnerabilityPermissionMap[vulnerability.CVEName]; ok {
vulnerability.Permission = "BLOCK"
} else {
vulnerability.Permission = "WHITELISTED"
}
updatedVulnerabilities = append(updatedVulnerabilities, vulnerability)
}
if updatedVulnerabilities == nil || len(updatedVulnerabilities) == 0 {
updatedVulnerabilities = make([]*Vulnerabilities, 0)
}
imageScanResponse.Vulnerabilities = updatedVulnerabilities
}
}
return imageScanResponse, nil
}
func (impl ImageScanServiceImpl) FetchMinScanResultByAppIdAndEnvId(request *ImageScanRequest) (*ImageScanExecutionDetail, error) {
//var scanExecution *security.ImageScanExecutionHistory
var scanExecutionIds []int
var executionTime time.Time
var objectType []string
objectType = append(objectType, security.ScanObjectType_APP)
objectType = append(objectType, security.ScanObjectType_CHART)
scanDeployInfo, err := impl.imageScanDeployInfoRepository.FetchByAppIdAndEnvId(request.AppId, request.EnvId, objectType)
if err != nil && pg.ErrNoRows != err {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
if scanDeployInfo == nil || scanDeployInfo.Id == 0 || err == pg.ErrNoRows {
return nil, err
}
for _, id := range scanDeployInfo.ImageScanExecutionHistoryId {
scanExecutionIds = append(scanExecutionIds, id)
}
var highCount, moderateCount, lowCount int
if len(scanExecutionIds) > 0 {
imageScanResult, err := impl.scanResultRepository.FetchByScanExecutionIds(scanExecutionIds)
if err != nil {
impl.Logger.Errorw("error while fetching scan execution result", "err", err)
return nil, err
}
for _, item := range imageScanResult {
executionTime = item.ImageScanExecutionHistory.ExecutionTime
if item.CveStore.Severity == security.Critical {
highCount = highCount + 1
} else if item.CveStore.Severity == security.Moderate {
moderateCount = moderateCount + 1
} else if item.CveStore.Severity == security.Low {
lowCount = lowCount + 1
}
}
}
severityCount := &SeverityCount{
High: highCount,
Moderate: moderateCount,
Low: lowCount,
}
imageScanResponse := &ImageScanExecutionDetail{
ImageScanDeployInfoId: scanDeployInfo.Id,
SeverityCount: severityCount,
ExecutionTime: executionTime,
ObjectType: scanDeployInfo.ObjectType,
ScanEnabled: true,
Scanned: true,
}
return imageScanResponse, nil
}
func (impl ImageScanServiceImpl) VulnerabilityExposure(request *security.VulnerabilityRequest) (*security.VulnerabilityExposureListingResponse, error) {
vulnerabilityExposureListingResponse := &security.VulnerabilityExposureListingResponse{
Offset: request.Offset,
Size: request.Size,
}
size := request.Size
request.Size = 0
count, err := impl.cveStoreRepository.VulnerabilityExposure(request)
if err != nil {
impl.Logger.Errorw("error while fetching vulnerability exposure", "err", err)
return nil, err
}
request.Size = size
vulnerabilityExposureListingResponse.Total = len(count)
vulnerabilityExposureList, err := impl.cveStoreRepository.VulnerabilityExposure(request)
if err != nil {
impl.Logger.Errorw("error while fetching vulnerability exposure", "err", err)
return nil, err
}
var cveStores []*security.CveStore
cveStore, err := impl.cveStoreRepository.FindByName(request.CveName)
if err != nil {
impl.Logger.Errorw("error while fetching cve store", "err", err)
return nil, err
}
envMap := make(map[int]cluster.EnvironmentBean)
environments, err := impl.envService.GetAllActive()
if err != nil {
impl.Logger.Errorw("error while fetching vulnerability exposure", "err", err)
return nil, err
}
for _, item := range environments {
envMap[item.Id] = item
}
cveStores = append(cveStores, cveStore)
for _, item := range vulnerabilityExposureList {
envId := 0
if item.AppStore {
envId = item.ChartEnvId
} else {
envId = item.PipelineEnvId
}
env := envMap[envId]
item.EnvId = envId
item.EnvName = env.Environment
blockCveList, err := impl.policyService.GetBlockedCVEList(cveStores, env.ClusterId, envId, item.AppId, item.AppStore)
if err != nil {
impl.Logger.Errorw("error while fetching blocked list", "err", err)
return nil, err
}
if len(blockCveList) > 0 {
item.Blocked = true
}
}
vulnerabilityExposureListingResponse.VulnerabilityExposure = vulnerabilityExposureList
return vulnerabilityExposureListingResponse, nil
}