From 67a1df5b834969df2e1882cce59055f18cd85814 Mon Sep 17 00:00:00 2001 From: atishj99 <141334503+cx-atish-jadhav@users.noreply.github.com> Date: Fri, 12 Sep 2025 15:38:14 +0530 Subject: [PATCH 1/2] Activate SCS engine support for JetBrains plugin --- .../java/com/checkmarx/ast/results/result/Data.java | 12 +++++++++++- .../com/checkmarx/ast/results/result/Result.java | 13 ++++++++++++- .../java/com/checkmarx/ast/wrapper/CxConstants.java | 1 + src/main/resources/cx.exe | 4 ++-- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/checkmarx/ast/results/result/Data.java b/src/main/java/com/checkmarx/ast/results/result/Data.java index e9427663..35bda141 100644 --- a/src/main/java/com/checkmarx/ast/results/result/Data.java +++ b/src/main/java/com/checkmarx/ast/results/result/Data.java @@ -31,6 +31,10 @@ public class Data { List nodes; List packageData; ScaPackageData scaPackageData; + // Secret Detection specific fields + String ruleName; + String ruleDescription; + String remediation; public Data(@JsonProperty("queryId") String queryId, @JsonProperty("queryName") String queryName, @@ -47,7 +51,10 @@ public Data(@JsonProperty("queryId") String queryId, @JsonProperty("line") int line, @JsonProperty("nodes") List nodes, @JsonProperty("packageData") List packageData, - @JsonProperty("scaPackageData") ScaPackageData scaPackageData) { + @JsonProperty("scaPackageData") ScaPackageData scaPackageData, + @JsonProperty("ruleName") String ruleName, + @JsonProperty("ruleDescription") String ruleDescription, + @JsonProperty("remediation") String remediation) { this.queryId = queryId; this.queryName = queryName; this.group = group; @@ -64,5 +71,8 @@ public Data(@JsonProperty("queryId") String queryId, this.nodes = nodes; this.packageData = packageData; this.scaPackageData = scaPackageData; + this.ruleName = ruleName; + this.ruleDescription = ruleDescription; + this.remediation = remediation; } } diff --git a/src/main/java/com/checkmarx/ast/results/result/Result.java b/src/main/java/com/checkmarx/ast/results/result/Result.java index 19686ab2..7217af2b 100644 --- a/src/main/java/com/checkmarx/ast/results/result/Result.java +++ b/src/main/java/com/checkmarx/ast/results/result/Result.java @@ -1,5 +1,6 @@ package com.checkmarx.ast.results.result; +import com.checkmarx.ast.wrapper.CxConstants; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -53,7 +54,7 @@ public Result(@JsonProperty("type") String type, @JsonProperty("comments") Comments comments, @JsonProperty("vulnerabilityDetails") VulnerabilityDetails vulnerabilityDetails, @JsonProperty("scaType") String scaType) { - this.type = type; + this.type = normalizeType(type); this.scaType=scaType; this.label = label; this.id = id; @@ -74,4 +75,14 @@ public Result(@JsonProperty("type") String type, this.comments = comments; this.vulnerabilityDetails = vulnerabilityDetails; } + + /** + * Normalizes special-case types coming from JSON into internal constants. + */ + private static String normalizeType(String rawType) { + if ("sscs-secret-detection".equals(rawType)) { + return CxConstants.SECRET_DETECTION; + } + return rawType; // leave other engine types unchanged + } } diff --git a/src/main/java/com/checkmarx/ast/wrapper/CxConstants.java b/src/main/java/com/checkmarx/ast/wrapper/CxConstants.java index 889bbb65..5f1b8f62 100644 --- a/src/main/java/com/checkmarx/ast/wrapper/CxConstants.java +++ b/src/main/java/com/checkmarx/ast/wrapper/CxConstants.java @@ -13,6 +13,7 @@ public final class CxConstants { public static final String AGENT = "--agent"; public static final String SAST = "sast"; public static final String DEBUG = "--debug"; + public static final String SECRET_DETECTION = "scs"; static final String CLIENT_ID = "--client-id"; static final String CLIENT_SECRET = "--client-secret"; static final String API_KEY = "--apikey"; diff --git a/src/main/resources/cx.exe b/src/main/resources/cx.exe index 7590ba6d..b4e789b9 100644 --- a/src/main/resources/cx.exe +++ b/src/main/resources/cx.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d56b322af737d1627b6ab557d060763be537bc140071e20019354ad59b7e22d -size 78636992 +oid sha256:2d2038f6782dea3c37b22fdb78cbbf4fef2c2ee31272ee221f9a84b8716e3a45 +size 115807232 From 3a58d46ca3b63e0e5043356f541aec06c72959d8 Mon Sep 17 00:00:00 2001 From: atishj99 <141334503+cx-atish-jadhav@users.noreply.github.com> Date: Sun, 14 Sep 2025 23:22:51 +0530 Subject: [PATCH 2/2] Updated CLI to 2.3.34 --- src/main/resources/cx.exe | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/cx.exe b/src/main/resources/cx.exe index 9a904feb..9e1310a1 100644 --- a/src/main/resources/cx.exe +++ b/src/main/resources/cx.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d2038f6782dea3c37b22fdb78cbbf4fef2c2ee31272ee221f9a84b8716e3a45 -size 115807232 \ No newline at end of file +oid sha256:4c07f01a2e147d22656fd7e3e53d9fc3f59a24283635915513c932e4a3e5c519 +size 82099648