diff --git a/src/main/java/com/cx/restclient/ast/AstScaClient.java b/src/main/java/com/cx/restclient/ast/AstScaClient.java index c74a6504..bca4e6da 100644 --- a/src/main/java/com/cx/restclient/ast/AstScaClient.java +++ b/src/main/java/com/cx/restclient/ast/AstScaClient.java @@ -308,8 +308,8 @@ public Results waitForScanResults() { } fileName = PDF_REPORT_NAME + "_" + now + "." + reportFormat.toLowerCase(); - String pdfLink = SASTUtils.writePDFReport(scanReport, config.getReportsDir(), fileName, log); if (reportFormat.toLowerCase().equals("pdf")) { + String pdfLink = SASTUtils.writePDFReport(scanReport, config.getReportsDir(), fileName, log); scaResults.setScaPDFLink(pdfLink); scaResults.setPdfFileName(fileName); } diff --git a/src/main/java/com/cx/restclient/sast/utils/LegacyClient.java b/src/main/java/com/cx/restclient/sast/utils/LegacyClient.java index 25bfe2a3..fb16e21e 100644 --- a/src/main/java/com/cx/restclient/sast/utils/LegacyClient.java +++ b/src/main/java/com/cx/restclient/sast/utils/LegacyClient.java @@ -126,6 +126,9 @@ public long resolveProjectId() throws IOException { } } else { projectId = projects.get(0).getId(); + if(config.isEnableDataRetention()) { + setRetentionRate(projectId); + } setIsNewProject(false); log.info("Project already exists with ID {}", projectId); }