Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ public void deleteUnusedBranches(List<String> existingBranches, long productId)
if(existingBranches == null) {
LOG.error("No existing branches given, this will lead to nullpointer");
}
RestTemplate restTemplate = new RestTemplate();

//get existing branches
List<EngagementResponse> engagementPayloads = getEngagementsForProduct(productId, 0);
Expand Down Expand Up @@ -627,4 +626,20 @@ public List<Finding> receiveNonHandledFindings(String productName, String engage
}
return findings;
}
public List<Finding> receiveNonHandledProductFindings(String productName, String minimumSeverity, LinkedMultiValueMap<String, String> options){
List<Finding> findings = new LinkedList<>();
long productId = retrieveProductId(productName);

List<EngagementResponse> engagementPayloads = getEngagementsForProduct(productId, 0);
for(EngagementResponse engagementPayload : engagementPayloads) {
long engagementId = engagementPayload.getId();
for(String severity : Finding.getServeritiesAndHigherServerities(minimumSeverity)) {
options.remove("severity");
options.add("severity", severity);
findings.addAll(getCurrentFindings(engagementId, options));
}
}

return findings;
}
}