code: private SecurityReviewAuditResponse getStaticSecurityScanResponse(CollectorItem collectorItem, long beginDate, long endDate) {
          List<CodeQuality> codeQualities = codeQualityRepository.findByCollectorItemIdAndTimestampIsBetweenOrderByTimestampDesc(collectorItem.getId(), beginDate - 1, endDate + 1);
  
          SecurityReviewAuditResponse securityReviewAuditResponse = new SecurityReviewAuditResponse();
          securityReviewAuditResponse.setAuditEntity(collectorItem.getOptions());
          securityReviewAuditResponse.setLastUpdated(collectorItem.getLastUpdated());
          if (CollectionUtils.isEmpty(codeQualities)) {
              securityReviewAuditResponse.addAuditStatus(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_MISSING);
              return securityReviewAuditResponse;
          }
          CodeQuality returnQuality = codeQualities.get(0);
          securityReviewAuditResponse.setCodeQuality(returnQuality);
          securityReviewAuditResponse.setLastExecutionTime(returnQuality.getTimestamp());
          Set<CodeQualityMetric> metrics = returnQuality.getMetrics();
  
          if (metrics.stream().anyMatch(metric -> metric.getName().equalsIgnoreCase(STR_CRITICAL))){
              securityReviewAuditResponse.addAuditStatus(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FOUND_CRITICAL);
          }else if (metrics.stream().anyMatch(metric -> metric.getName().equalsIgnoreCase(STR_HIGH))){
              securityReviewAuditResponse.addAuditStatus(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FOUND_HIGH);
          }else{
              CodeQualityMetric scoreMetric = metrics.stream().filter(metric -> metric.getName().equalsIgnoreCase(STR_SCORE)).findFirst().get();
              Integer nScore = StringUtils.isNumeric(scoreMetric.getValue()) ? Integer.parseInt(scoreMetric.getValue()) : 0;
              if (nScore > 0) {
                  securityReviewAuditResponse.addAuditStatus(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_OK);
              } else {
                  securityReviewAuditResponse.addAuditStatus(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FAIL);
              }
          }
          return securityReviewAuditResponse;
      }
docs: Reusable method for constructing the CodeQualityAuditResponse object
  
  @param collectorItem Collector Item
  @param beginDate Begin Date
  @param endDate End Date
  @return SecurityReviewAuditResponse