From ae3e21ef6ed0623f70c7060c5ce6ff49f64314c7 Mon Sep 17 00:00:00 2001
From: itsKedar <37594766+itsKedar@users.noreply.github.com>
Date: Thu, 6 Jul 2023 14:36:27 +0530
Subject: [PATCH] Branched project configuration fix
---
pom.xml | 2 +-
.../com/checkmarx/sdk/service/CxService.java | 22 ++++++++++++++-----
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index f37f056e..6ecd8ee8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
com.github.checkmarx-ltd
cx-spring-boot-sdk
- 0.5.53
+ 0.5.54
cx-spring-boot-sdk
Checkmarx Java Spring Boot SDK
diff --git a/src/main/java/com/checkmarx/sdk/service/CxService.java b/src/main/java/com/checkmarx/sdk/service/CxService.java
index 71794123..3dbf6f20 100644
--- a/src/main/java/com/checkmarx/sdk/service/CxService.java
+++ b/src/main/java/com/checkmarx/sdk/service/CxService.java
@@ -2161,19 +2161,29 @@ public Integer createScan(CxScanParams params, String comment) throws CheckmarxE
}else if(cxProperties.getPostActionPostbackId() != null && cxProperties.getPostActionPostbackId() != 0){
createScanSetting(projectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
params.getEmailNotifications());
- createScanSetting(baseProjectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
- params.getEmailNotifications());
+ if(cxProperties.getCxBranch())
+ {
+ createScanSetting(baseProjectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
+ params.getEmailNotifications());
+ }
+
}else{
if(customTaskDetais!=null){
createScanSetting(projectId, presetId, engineConfigurationId, customTaskDetais.getId(),
params.getEmailNotifications());
- createScanSetting(baseProjectId, presetId, engineConfigurationId, customTaskDetais.getId(),
- params.getEmailNotifications());
+ if(cxProperties.getCxBranch())
+ {
+ createScanSetting(baseProjectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
+ params.getEmailNotifications());
+ }
}else{
createScanSetting(projectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
params.getEmailNotifications());
- createScanSetting(baseProjectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
- params.getEmailNotifications());
+ if(cxProperties.getCxBranch())
+ {
+ createScanSetting(baseProjectId, presetId, engineConfigurationId, cxProperties.getPostActionPostbackId(),
+ params.getEmailNotifications());
+ }
}
}