@SuppressWarnings("unchecked") @Test public void getVulnerabilitiesOccurrencesTest() throws Exception { List<Map<String, Object>> vulnDetails = new ArrayList<>(); Request request = new Request(); request.setAg("ag"); request.setFrom(0); Map<String, String> filter = new HashMap<>(); filter.put("severity", "3"); request.setFilter(filter); when(vulnerabilityService.vulnerabilityAssetCount(anyString(), anyMap(), anyString(),anyString(),anyInt(), anyInt())).thenReturn(10); when(vulnerabilityService.getAllVulnerabilitiesDetailsByAssetGroup(anyString(), anyMap(),anyString(),anyString(),anyString(), anyInt(), anyInt())) .thenReturn(vulnDetails); assertTrue(vulnerabilityController.getVulnerabilitiesOccurrences(request) .getStatusCode() == HttpStatus.OK); request.setFilter(new HashMap<>()); vulnDetails.add(new HashMap<>()); vulnDetails.add(new HashMap<>()); when(vulnerabilityService.vulnerabilityAssetCount(anyString(), anyMap(),anyString(),anyString() ,anyInt(), anyInt())).thenReturn(10); when(vulnerabilityService.getAllVulnerabilitiesDetailsByAssetGroup(anyString(), anyMap(),anyString(),anyString(),anyString(), anyInt(), anyInt())) .thenReturn(vulnDetails); assertTrue(vulnerabilityController.getVulnerabilitiesOccurrences(request) .getStatusCode() == HttpStatus.OK); request.setSize(0); when(vulnerabilityService.vulnerabilityAssetCount(anyString(), anyMap(),anyString(),anyString(), anyInt(), anyInt())).thenReturn(10); when(vulnerabilityService.getAllVulnerabilitiesDetailsByAssetGroup(anyString(), anyMap(),anyString(),anyString(),anyString(), anyInt(), anyInt())) .thenReturn(vulnDetails); assertTrue(vulnerabilityController.getVulnerabilitiesOccurrences(request) .getStatusCode() == HttpStatus.OK); request.setSize(3); when(vulnerabilityService.vulnerabilityAssetCount(anyString(), anyMap(),anyString(),anyString(), anyInt(), anyInt())).thenReturn(10); when(vulnerabilityService.getAllVulnerabilitiesDetailsByAssetGroup(anyString(), anyMap(), anyString(),anyString(),anyString(),anyInt(), anyInt())) .thenReturn(vulnDetails); assertTrue(vulnerabilityController.getVulnerabilitiesOccurrences(request) .getStatusCode() == HttpStatus.OK); }
@ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") public ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request) { ResponseWithCount response = null; String assetGroup = request.getAg(); if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY)); } String searchText = request.getSearchtext(); int from = request.getFrom(); int size = request.getSize(); List<String> severitiesList = new ArrayList<>(); List<String> severities = new ArrayList<>(); boolean allMatch = false; severitiesList.add("3"); severitiesList.add("4"); severitiesList.add("5"); if (from < 0) { return ResponseUtils.buildFailureResponse(new Exception("From should not be a negative number")); } Map<String, String> filter = request.getFilter(); Map<String, String> severityfilter = new HashMap<>(); String applicationFilter = null; String environmentFilter = null; for (Map.Entry<String, String> entry : filter.entrySet()) { if (entry.getKey().equals("severitylevel")) { severityfilter.put(entry.getKey(), entry.getValue()); } else if (entry.getKey().equals("tags.Application.keyword")) { applicationFilter = entry.getValue(); } else if (entry.getKey().equals("tags.Environment.keyword")) { environmentFilter = entry.getValue(); } } if (severityfilter.size() > 0) { for (Map.Entry<String, String> entry : severityfilter.entrySet()) { severities = Arrays.asList(entry.getValue().split(",")); } allMatch = severities.stream().allMatch(severitiesList::contains); if (allMatch != true) { return ResponseUtils.buildFailureResponse(new Exception("Severity level can only be 3,4 or 5")); } } if (!(Optional.ofNullable(size).isPresent()) && size != 0) { from = 0; size = 0; } try { int vulnerabilityOccuranceListCount = vulnerabilityService.vulnerabilityAssetCount(assetGroup, severityfilter, applicationFilter, environmentFilter, from, size); List<Map<String, Object>> vulnerabilityOccuranceList = vulnerabilityService .getAllVulnerabilitiesDetailsByAssetGroup(assetGroup, severityfilter,applicationFilter, environmentFilter, searchText, from, size); if (vulnerabilityOccuranceList.isEmpty()) { return ResponseUtils .buildSucessResponse(new ResponseWithCount(new ArrayList<Map<String, Object>>(), 0)); } response = new ResponseWithCount(vulnerabilityOccuranceList, vulnerabilityOccuranceListCount); } catch (Exception e) { LOGGER.error(EXE_VULN, e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }
VulnerabilityController implements Constants { @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") public ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request) { ResponseWithCount response = null; String assetGroup = request.getAg(); if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY)); } String searchText = request.getSearchtext(); int from = request.getFrom(); int size = request.getSize(); List<String> severitiesList = new ArrayList<>(); List<String> severities = new ArrayList<>(); boolean allMatch = false; severitiesList.add("3"); severitiesList.add("4"); severitiesList.add("5"); if (from < 0) { return ResponseUtils.buildFailureResponse(new Exception("From should not be a negative number")); } Map<String, String> filter = request.getFilter(); Map<String, String> severityfilter = new HashMap<>(); String applicationFilter = null; String environmentFilter = null; for (Map.Entry<String, String> entry : filter.entrySet()) { if (entry.getKey().equals("severitylevel")) { severityfilter.put(entry.getKey(), entry.getValue()); } else if (entry.getKey().equals("tags.Application.keyword")) { applicationFilter = entry.getValue(); } else if (entry.getKey().equals("tags.Environment.keyword")) { environmentFilter = entry.getValue(); } } if (severityfilter.size() > 0) { for (Map.Entry<String, String> entry : severityfilter.entrySet()) { severities = Arrays.asList(entry.getValue().split(",")); } allMatch = severities.stream().allMatch(severitiesList::contains); if (allMatch != true) { return ResponseUtils.buildFailureResponse(new Exception("Severity level can only be 3,4 or 5")); } } if (!(Optional.ofNullable(size).isPresent()) && size != 0) { from = 0; size = 0; } try { int vulnerabilityOccuranceListCount = vulnerabilityService.vulnerabilityAssetCount(assetGroup, severityfilter, applicationFilter, environmentFilter, from, size); List<Map<String, Object>> vulnerabilityOccuranceList = vulnerabilityService .getAllVulnerabilitiesDetailsByAssetGroup(assetGroup, severityfilter,applicationFilter, environmentFilter, searchText, from, size); if (vulnerabilityOccuranceList.isEmpty()) { return ResponseUtils .buildSucessResponse(new ResponseWithCount(new ArrayList<Map<String, Object>>(), 0)); } response = new ResponseWithCount(vulnerabilityOccuranceList, vulnerabilityOccuranceListCount); } catch (Exception e) { LOGGER.error(EXE_VULN, e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); } }
VulnerabilityController implements Constants { @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") public ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request) { ResponseWithCount response = null; String assetGroup = request.getAg(); if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY)); } String searchText = request.getSearchtext(); int from = request.getFrom(); int size = request.getSize(); List<String> severitiesList = new ArrayList<>(); List<String> severities = new ArrayList<>(); boolean allMatch = false; severitiesList.add("3"); severitiesList.add("4"); severitiesList.add("5"); if (from < 0) { return ResponseUtils.buildFailureResponse(new Exception("From should not be a negative number")); } Map<String, String> filter = request.getFilter(); Map<String, String> severityfilter = new HashMap<>(); String applicationFilter = null; String environmentFilter = null; for (Map.Entry<String, String> entry : filter.entrySet()) { if (entry.getKey().equals("severitylevel")) { severityfilter.put(entry.getKey(), entry.getValue()); } else if (entry.getKey().equals("tags.Application.keyword")) { applicationFilter = entry.getValue(); } else if (entry.getKey().equals("tags.Environment.keyword")) { environmentFilter = entry.getValue(); } } if (severityfilter.size() > 0) { for (Map.Entry<String, String> entry : severityfilter.entrySet()) { severities = Arrays.asList(entry.getValue().split(",")); } allMatch = severities.stream().allMatch(severitiesList::contains); if (allMatch != true) { return ResponseUtils.buildFailureResponse(new Exception("Severity level can only be 3,4 or 5")); } } if (!(Optional.ofNullable(size).isPresent()) && size != 0) { from = 0; size = 0; } try { int vulnerabilityOccuranceListCount = vulnerabilityService.vulnerabilityAssetCount(assetGroup, severityfilter, applicationFilter, environmentFilter, from, size); List<Map<String, Object>> vulnerabilityOccuranceList = vulnerabilityService .getAllVulnerabilitiesDetailsByAssetGroup(assetGroup, severityfilter,applicationFilter, environmentFilter, searchText, from, size); if (vulnerabilityOccuranceList.isEmpty()) { return ResponseUtils .buildSucessResponse(new ResponseWithCount(new ArrayList<Map<String, Object>>(), 0)); } response = new ResponseWithCount(vulnerabilityOccuranceList, vulnerabilityOccuranceListCount); } catch (Exception e) { LOGGER.error(EXE_VULN, e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  }
VulnerabilityController implements Constants { @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") public ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request) { ResponseWithCount response = null; String assetGroup = request.getAg(); if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY)); } String searchText = request.getSearchtext(); int from = request.getFrom(); int size = request.getSize(); List<String> severitiesList = new ArrayList<>(); List<String> severities = new ArrayList<>(); boolean allMatch = false; severitiesList.add("3"); severitiesList.add("4"); severitiesList.add("5"); if (from < 0) { return ResponseUtils.buildFailureResponse(new Exception("From should not be a negative number")); } Map<String, String> filter = request.getFilter(); Map<String, String> severityfilter = new HashMap<>(); String applicationFilter = null; String environmentFilter = null; for (Map.Entry<String, String> entry : filter.entrySet()) { if (entry.getKey().equals("severitylevel")) { severityfilter.put(entry.getKey(), entry.getValue()); } else if (entry.getKey().equals("tags.Application.keyword")) { applicationFilter = entry.getValue(); } else if (entry.getKey().equals("tags.Environment.keyword")) { environmentFilter = entry.getValue(); } } if (severityfilter.size() > 0) { for (Map.Entry<String, String> entry : severityfilter.entrySet()) { severities = Arrays.asList(entry.getValue().split(",")); } allMatch = severities.stream().allMatch(severitiesList::contains); if (allMatch != true) { return ResponseUtils.buildFailureResponse(new Exception("Severity level can only be 3,4 or 5")); } } if (!(Optional.ofNullable(size).isPresent()) && size != 0) { from = 0; size = 0; } try { int vulnerabilityOccuranceListCount = vulnerabilityService.vulnerabilityAssetCount(assetGroup, severityfilter, applicationFilter, environmentFilter, from, size); List<Map<String, Object>> vulnerabilityOccuranceList = vulnerabilityService .getAllVulnerabilitiesDetailsByAssetGroup(assetGroup, severityfilter,applicationFilter, environmentFilter, searchText, from, size); if (vulnerabilityOccuranceList.isEmpty()) { return ResponseUtils .buildSucessResponse(new ResponseWithCount(new ArrayList<Map<String, Object>>(), 0)); } response = new ResponseWithCount(vulnerabilityOccuranceList, vulnerabilityOccuranceListCount); } catch (Exception e) { LOGGER.error(EXE_VULN, e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @SuppressWarnings("unchecked") @PostMapping(value = "/v1/vulnerabilities/detail") ResponseEntity<Object> getVulnerabilitiesDetails(@RequestBody(required = true) Request request); @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request); @RequestMapping(path = "/v1/vulnerabilities/summary", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitysummary(@RequestParam(name = "ag", required = true) String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/summarybyapplication", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByApplications(@RequestParam("ag") String assetGroup); @PostMapping(value = "/v1/vulnerabilities/trend") ResponseEntity<Object> getVulnerabilitiesTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/summarybyenvironment", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByEnvironment(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "application", required = false) String application); @RequestMapping(path = "/v1/vulnerabilities/distribution", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityDistribution(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/vulnerabilities/summary/{resourceId}", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitysummaryByResourceId(
			@PathVariable(name = "resourceId", required = true) String resourceId); @SuppressWarnings("unchecked") @RequestMapping(path = "/v1/vulnerabilities/detail/{resourceId}", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityDetailsByResourceId(
			@PathVariable(name = "resourceId", required = true) String resourceId,
			@RequestParam(name = "searchtext", required = false) String searchtext,
			@RequestParam(name = "from", required = false) Integer from,
			@RequestParam(name = "size", required = false) Integer size); @RequestMapping(path = "/v1/vulnerabilities/aging/summary", method = RequestMethod.GET) ResponseEntity<Object> getAgingSummary(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/vulnerabilities/qids", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByQid(@RequestParam("qid") String qid); @RequestMapping(path = "/v1/vulnerabilities/distribution-vulntype", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByVulnType(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/distribution-infra", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByInfraType(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/distribution-env", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByEnv(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/remediations/summary", method = RequestMethod.GET) ResponseEntity<Object> getRemediationActionsSummary(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/performers", method = RequestMethod.GET) ResponseEntity<Object> getHighestLowestPerformers(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v2/vulnerabilities/performers", method = RequestMethod.GET) ResponseEntity<Object> getHighestLowestPerformers(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity,
			@RequestParam(name = "type") PerfType type); @Cacheable(cacheNames = "trends", key = "#request.vulnCacheKey", unless = "#result.statusCodeValue!=200") @RequestMapping(path = "/v1/vulnerabilities/trend/open-new", method = RequestMethod.POST) ResponseEntity<Object> getVulnerabilityTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/trend/notes", method = RequestMethod.POST) ResponseEntity<Object> createTrendAnnotation(@RequestBody(required = true) TrendNote request); @RequestMapping(path = "/v1/vulnerabilities/trend/notes", method = RequestMethod.GET) ResponseEntity<Object> getTrendAnnotations(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "from", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date from); @RequestMapping(path = "/v1/vulnerabilities/trend/notes/{noteId}", method = RequestMethod.DELETE) ResponseEntity<Object> deleteTrendAnnotation(@PathVariable(name = "noteId", required = true) String noteId); @Cacheable(cacheNames = "trendsvuln", key = "#request.vulnCacheKey", unless = "#result.statusCodeValue!=200") @RequestMapping(path = "/v1/vulnerabilities/trend/total-affected", method = RequestMethod.POST) ResponseEntity<Object> getVulnerabilityAssetsTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/summarybyassets", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitySummaryByAssets(
			@RequestParam(name = "ag", required = true) String assetGroup); @RequestMapping(path = "/v1/vulnerabilites", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilities(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/trend/compliance/vulnerabilities", method = RequestMethod.POST) ResponseEntity<Object> getVulnTrend(@RequestBody(required = true) CompliantTrendRequest request); }
VulnerabilityController implements Constants { @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") public ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request) { ResponseWithCount response = null; String assetGroup = request.getAg(); if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY)); } String searchText = request.getSearchtext(); int from = request.getFrom(); int size = request.getSize(); List<String> severitiesList = new ArrayList<>(); List<String> severities = new ArrayList<>(); boolean allMatch = false; severitiesList.add("3"); severitiesList.add("4"); severitiesList.add("5"); if (from < 0) { return ResponseUtils.buildFailureResponse(new Exception("From should not be a negative number")); } Map<String, String> filter = request.getFilter(); Map<String, String> severityfilter = new HashMap<>(); String applicationFilter = null; String environmentFilter = null; for (Map.Entry<String, String> entry : filter.entrySet()) { if (entry.getKey().equals("severitylevel")) { severityfilter.put(entry.getKey(), entry.getValue()); } else if (entry.getKey().equals("tags.Application.keyword")) { applicationFilter = entry.getValue(); } else if (entry.getKey().equals("tags.Environment.keyword")) { environmentFilter = entry.getValue(); } } if (severityfilter.size() > 0) { for (Map.Entry<String, String> entry : severityfilter.entrySet()) { severities = Arrays.asList(entry.getValue().split(",")); } allMatch = severities.stream().allMatch(severitiesList::contains); if (allMatch != true) { return ResponseUtils.buildFailureResponse(new Exception("Severity level can only be 3,4 or 5")); } } if (!(Optional.ofNullable(size).isPresent()) && size != 0) { from = 0; size = 0; } try { int vulnerabilityOccuranceListCount = vulnerabilityService.vulnerabilityAssetCount(assetGroup, severityfilter, applicationFilter, environmentFilter, from, size); List<Map<String, Object>> vulnerabilityOccuranceList = vulnerabilityService .getAllVulnerabilitiesDetailsByAssetGroup(assetGroup, severityfilter,applicationFilter, environmentFilter, searchText, from, size); if (vulnerabilityOccuranceList.isEmpty()) { return ResponseUtils .buildSucessResponse(new ResponseWithCount(new ArrayList<Map<String, Object>>(), 0)); } response = new ResponseWithCount(vulnerabilityOccuranceList, vulnerabilityOccuranceListCount); } catch (Exception e) { LOGGER.error(EXE_VULN, e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @SuppressWarnings("unchecked") @PostMapping(value = "/v1/vulnerabilities/detail") ResponseEntity<Object> getVulnerabilitiesDetails(@RequestBody(required = true) Request request); @ApiOperation(httpMethod = "POST", value = "Get the cartesian product of vulnerability occureneces of asset and details of assets in an asset group. Filter can receive 'severitylevel' as comma seperated." + "'searchtext' can be used to get the sorted result based on the search text provided.Sample request: {\"ag\":\"pacman\",\"filter\":{\"severitylevel\":\"3,5\"},\"from\":0,\"searchtext\":\"\",\"size\":25}") @PostMapping(value = "/v1/vulnerabilities/occurrences") ResponseEntity<Object> getVulnerabilitiesOccurrences(@RequestBody(required = true) Request request); @RequestMapping(path = "/v1/vulnerabilities/summary", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitysummary(@RequestParam(name = "ag", required = true) String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/summarybyapplication", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByApplications(@RequestParam("ag") String assetGroup); @PostMapping(value = "/v1/vulnerabilities/trend") ResponseEntity<Object> getVulnerabilitiesTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/summarybyenvironment", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByEnvironment(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "application", required = false) String application); @RequestMapping(path = "/v1/vulnerabilities/distribution", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityDistribution(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/vulnerabilities/summary/{resourceId}", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitysummaryByResourceId(
			@PathVariable(name = "resourceId", required = true) String resourceId); @SuppressWarnings("unchecked") @RequestMapping(path = "/v1/vulnerabilities/detail/{resourceId}", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityDetailsByResourceId(
			@PathVariable(name = "resourceId", required = true) String resourceId,
			@RequestParam(name = "searchtext", required = false) String searchtext,
			@RequestParam(name = "from", required = false) Integer from,
			@RequestParam(name = "size", required = false) Integer size); @RequestMapping(path = "/v1/vulnerabilities/aging/summary", method = RequestMethod.GET) ResponseEntity<Object> getAgingSummary(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/vulnerabilities/qids", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilityByQid(@RequestParam("qid") String qid); @RequestMapping(path = "/v1/vulnerabilities/distribution-vulntype", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByVulnType(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/distribution-infra", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByInfraType(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/distribution-env", method = RequestMethod.GET) ResponseEntity<Object> getDistributionSummaryByEnv(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/remediations/summary", method = RequestMethod.GET) ResponseEntity<Object> getRemediationActionsSummary(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v1/vulnerabilities/performers", method = RequestMethod.GET) ResponseEntity<Object> getHighestLowestPerformers(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity); @RequestMapping(path = "/v2/vulnerabilities/performers", method = RequestMethod.GET) ResponseEntity<Object> getHighestLowestPerformers(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "severity", required = false) String severity,
			@RequestParam(name = "type") PerfType type); @Cacheable(cacheNames = "trends", key = "#request.vulnCacheKey", unless = "#result.statusCodeValue!=200") @RequestMapping(path = "/v1/vulnerabilities/trend/open-new", method = RequestMethod.POST) ResponseEntity<Object> getVulnerabilityTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/trend/notes", method = RequestMethod.POST) ResponseEntity<Object> createTrendAnnotation(@RequestBody(required = true) TrendNote request); @RequestMapping(path = "/v1/vulnerabilities/trend/notes", method = RequestMethod.GET) ResponseEntity<Object> getTrendAnnotations(@RequestParam("ag") String assetGroup,
			@RequestParam(name = "from", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date from); @RequestMapping(path = "/v1/vulnerabilities/trend/notes/{noteId}", method = RequestMethod.DELETE) ResponseEntity<Object> deleteTrendAnnotation(@PathVariable(name = "noteId", required = true) String noteId); @Cacheable(cacheNames = "trendsvuln", key = "#request.vulnCacheKey", unless = "#result.statusCodeValue!=200") @RequestMapping(path = "/v1/vulnerabilities/trend/total-affected", method = RequestMethod.POST) ResponseEntity<Object> getVulnerabilityAssetsTrend(@RequestBody(required = true) TrendRequest request); @RequestMapping(path = "/v1/vulnerabilities/summarybyassets", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilitySummaryByAssets(
			@RequestParam(name = "ag", required = true) String assetGroup); @RequestMapping(path = "/v1/vulnerabilites", method = RequestMethod.GET) ResponseEntity<Object> getVulnerabilities(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/trend/compliance/vulnerabilities", method = RequestMethod.POST) ResponseEntity<Object> getVulnTrend(@RequestBody(required = true) CompliantTrendRequest request);  }