diff --git a/src/main/java/com/checkmarx/flow/custom/SarifIssueTracker.java b/src/main/java/com/checkmarx/flow/custom/SarifIssueTracker.java index 47bde8cef..2e1be1fda 100644 --- a/src/main/java/com/checkmarx/flow/custom/SarifIssueTracker.java +++ b/src/main/java/com/checkmarx/flow/custom/SarifIssueTracker.java @@ -207,7 +207,7 @@ private void generateSastResults(ScanResults results, List r Map node = (Map)result.get(pathNodeId.toString()); Integer line = (Integer.valueOf(Optional.ofNullable(node.get("line")).orElse("1")) == 0) ? 1 : Integer.valueOf(Optional.ofNullable(node.get("line")).orElse("1")); /* Sarif format does not support 0 as line number */ - Integer col = (Integer.valueOf(Optional.ofNullable(node.get("column")).orElse("1")) == 0) ? + Integer col = (Integer.valueOf(Optional.ofNullable(node.get("column")).orElse("1")) <= 0) ? 1 : (Integer.valueOf(Optional.ofNullable(node.get("column")).orElse("1"))); /* Sarif format does not support 0 as column number */ Integer len = (Integer.valueOf(Optional.ofNullable(node.get("length")).orElse("1")) == 0) ? 1 : (Integer.valueOf(Optional.ofNullable(node.get("length")).orElse("1"))); /* Sarif format does not support 0 as column number */